Skip to content

Commit

Permalink
fix(ssr): add semicolon before self-removal script (vuejs#6794)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored and hefeng committed Jan 25, 2019
1 parent 87bcd8e commit 7d0edba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/template-renderer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default class TemplateRenderer {
windowKey = '__INITIAL_STATE__'
} = options || {}
const autoRemove = process.env.NODE_ENV === 'production'
? '(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'
? ';(function(){var s;(s=document.currentScript||document.scripts[document.scripts.length-1]).parentNode.removeChild(s);}());'
: ''
return context[contextKey]
? `<script>window.${windowKey}=${
Expand Down

0 comments on commit 7d0edba

Please sign in to comment.