Skip to content

Commit

Permalink
Update baseHandlers.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 authored May 10, 2022
1 parent 8dd04b3 commit 565263b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/reactivity/src/baseHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`)

const builtInSymbols = new Set(
Object.getOwnPropertyNames(Symbol)
.filter(key => {
// ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller'
// fix TypeError "arguments","callee" and "caller" cannot be accessed in strict mode vue
const excludes = ['arguments', 'caller'];
return !excludes.includes(key);
})
// ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller'
// but accessing them on Symbol leads to TypeError because Symbol is a strict mode
// function
.filter(key => key !== 'arguments' && key !== 'caller')
.map(key => (Symbol as any)[key])
.filter(isSymbol)
)
Expand Down

0 comments on commit 565263b

Please sign in to comment.