fix(reactivity): ios10.x compatibility (#4900)

This commit is contained in:
descire 2022-05-10 16:10:40 +08:00 committed by GitHub
parent d52907f4eb
commit b87dc06193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,10 @@ const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`)
const builtInSymbols = new Set( const builtInSymbols = new Set(
/*#__PURE__*/ /*#__PURE__*/
Object.getOwnPropertyNames(Symbol) 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]) .map(key => (Symbol as any)[key])
.filter(isSymbol) .filter(isSymbol)
) )