Skip to content

Commit b87dc06

Browse files
authored
fix(reactivity): ios10.x compatibility (#4900)
1 parent d52907f commit b87dc06

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/reactivity/src/baseHandlers.ts

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`)
3737
const builtInSymbols = new Set(
3838
/*#__PURE__*/
3939
Object.getOwnPropertyNames(Symbol)
40+
// ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller'
41+
// but accessing them on Symbol leads to TypeError because Symbol is a strict mode
42+
// function
43+
.filter(key => key !== 'arguments' && key !== 'caller')
4044
.map(key => (Symbol as any)[key])
4145
.filter(isSymbol)
4246
)

0 commit comments

Comments
 (0)