Skip to content

Commit 4b1322e

Browse files
JounQin孙广彪
authored and
孙广彪
committed
fix(ssr): add semicolon before self-removal script (vuejs#6794)
1 parent 37dd206 commit 4b1322e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/template-renderer/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class TemplateRenderer {
192192
windowKey = '__INITIAL_STATE__'
193193
} = options || {}
194194
const autoRemove = process.env.NODE_ENV === 'production'
195-
? '(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'
195+
? ';(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'
196196
: ''
197197
return context[contextKey]
198198
? `<script>window.${windowKey}=${

0 commit comments

Comments
 (0)