|
|
@@ -9,7 +9,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
|
|
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
|
|
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
|
|
- 'require,__webpack_require__' // for Webpack/Browserify
|
|
|
+ 'require' // for Webpack/Browserify
|
|
|
)
|
|
|
|
|
|
hasProxy =
|
|
|
@@ -19,8 +19,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
proxyHandlers = {
|
|
|
has (target, key) {
|
|
|
const has = key in target
|
|
|
- const isAllowedGlobal = allowedGlobals(key)
|
|
|
- if (!has && !isAllowedGlobal) {
|
|
|
+ const isAllowed = allowedGlobals(key) || key.charAt(0) === '_'
|
|
|
+ if (!has && !isAllowed) {
|
|
|
warn(
|
|
|
`Property or method "${key}" is not defined on the instance but ` +
|
|
|
`referenced during render. Make sure to declare reactive data ` +
|
|
|
@@ -28,7 +28,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
target
|
|
|
)
|
|
|
}
|
|
|
- return !isAllowedGlobal
|
|
|
+ return has || !isAllowed
|
|
|
}
|
|
|
}
|
|
|
|