We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bb389d commit 2409ff0Copy full SHA for 2409ff0
src/server/template-renderer/index.js
@@ -192,7 +192,7 @@ export default class TemplateRenderer {
192
windowKey = '__INITIAL_STATE__'
193
} = options || {}
194
const autoRemove = process.env.NODE_ENV === 'production'
195
- ? '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);}());'
196
: ''
197
return context[contextKey]
198
? `<script>window.${windowKey}=${
0 commit comments