Skip to content

Commit

Permalink
fix: fix a compatible problem when using ios10.x (#3677)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsiqi818 committed Jan 17, 2023
1 parent 0bf551e commit 2fce092
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/reactive/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import { createObservable } from './internals'

const wellKnownSymbols = new Set(
Object.getOwnPropertyNames(Symbol)
.map((key) => Symbol[key])
.filter((value) => typeof value === 'symbol')
.reduce((buf: Symbol[], key) => {
if (key === 'arguments' || key === 'caller') return buf
const value = Symbol[key]
if (typeof value === 'symbol') return buf.concat(value)
return buf
}, [])
)

const hasOwnProperty = Object.prototype.hasOwnProperty
Expand Down

0 comments on commit 2fce092

Please sign in to comment.