Skip to content

Commit

Permalink
fix(ssr): add semicolon before self-removal script (#6794)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin authored and yyx990803 committed Oct 13, 2017
1 parent 1f84dd1 commit 5a15a8d
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 5a15a8d

Please sign in to comment.