From b87dc061930e62c78b4cc9a79f385e5880cdf8ae Mon Sep 17 00:00:00 2001 From: descire Date: Tue, 10 May 2022 16:10:40 +0800 Subject: [PATCH] fix(reactivity): ios10.x compatibility (#4900) --- packages/reactivity/src/baseHandlers.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 7e564f29def..dac444ffdc1 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -37,6 +37,10 @@ const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`) const builtInSymbols = new Set( /*#__PURE__*/ Object.getOwnPropertyNames(Symbol) + // 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) )