From: descire Date: Tue, 10 May 2022 08:10:40 +0000 (+0800) Subject: fix(reactivity): ios10.x compatibility (#4900) X-Git-Tag: v3.2.34-beta.1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b87dc061930e62c78b4cc9a79f385e5880cdf8ae;p=thirdparty%2Fvuejs%2Fcore.git fix(reactivity): ios10.x compatibility (#4900) --- diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 7e564f29de..dac444ffdc 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) )