fix(build): remove __RUNTIME_COMPILE__ flag

behavior should be consistent in all builds. fix #817
This commit is contained in:
Evan You
2020-03-11 16:39:26 -04:00
parent f59779706b
commit 206640a2d8
6 changed files with 16 additions and 29 deletions

View File

@@ -75,10 +75,6 @@ const enum AccessTypes {
export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
get(target: ComponentInternalInstance, key: string) {
// fast path for unscopables when using `with` block
if (__RUNTIME_COMPILE__ && (key as any) === Symbol.unscopables) {
return
}
const {
renderContext,
data,
@@ -189,6 +185,13 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
export const runtimeCompiledRenderProxyHandlers = {
...PublicInstanceProxyHandlers,
get(target: ComponentInternalInstance, key: string) {
// fast path for unscopables when using `with` block
if ((key as any) === Symbol.unscopables) {
return
}
return PublicInstanceProxyHandlers.get!(target, key, target)
},
has(_target: ComponentInternalInstance, key: string) {
return key[0] !== '_' && !isGloballyWhitelisted(key)
}