This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ export default function vue(options = {}) {
123123 const map = new MagicString ( source ) ;
124124
125125 return {
126- code : source . replace ( / i f [ \s ] * \( ' _ _ V U E _ W I T H _ S T A T E M E N T _ _ ' \) / g, 'with(this)' ) ,
126+ code : source . replace ( / i f [ \s ] * \( w i n d o w \. _ _ V U E _ W I T H _ S T A T E M E N T _ _ \) / g, 'with(this)' ) ,
127127 map : map . generateMap ( { hires : true } ) ,
128128 } ;
129129 } ,
130130 ongenerate ( opts , rendered ) {
131131 generateStyleBundle ( ) ;
132132 rendered . code = rendered . code . replace (
133- / i f [ \s ] * \( ' _ _ V U E _ W I T H _ S T A T E M E N T _ _ ' \) / g, 'with(this)' ) ;
133+ / i f [ \s ] * \( w i n d o w \. _ _ V U E _ W I T H _ S T A T E M E N T _ _ \) / g, 'with(this)' ) ;
134134 } ,
135135 } ;
136136}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function padContent(content) {
4747function wrapRenderFunction ( code ) {
4848 // Replace with(this) by something that works on strict mode
4949 // https://github.com/vuejs/vue-template-es2015-compiler/blob/master/index.js
50- code = code . replace ( / w i t h \( t h i s \) / g, "if(' __VUE_WITH_STATEMENT__' )" ) ;
50+ code = code . replace ( / w i t h \( t h i s \) / g, "if(window. __VUE_WITH_STATEMENT__)" ) ;
5151 return `function(){${ code } }` ;
5252}
5353
You can’t perform that action at this time.
0 commit comments