]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(reactivity): ios10.x compatibility (#4900)
authordescire <daiqingyunc@gmail.com>
Tue, 10 May 2022 08:10:40 +0000 (16:10 +0800)
committerGitHub <noreply@github.com>
Tue, 10 May 2022 08:10:40 +0000 (04:10 -0400)
packages/reactivity/src/baseHandlers.ts

index 7e564f29def4a205abbb6628e46181b9bffed959..dac444ffdc115909495b389bb27e43d964118241 100644 (file)
@@ -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)
 )