diff --git a/packages/reactivity/__tests__/effect.spec.ts b/packages/reactivity/__tests__/effect.spec.ts index 4e49a146d23..7285bb539ed 100644 --- a/packages/reactivity/__tests__/effect.spec.ts +++ b/packages/reactivity/__tests__/effect.spec.ts @@ -759,7 +759,7 @@ describe('reactivity/effect', () => { expect(fnSpy).toHaveBeenCalledTimes(1) }) - it('should trigger all effects when array length is set 0', () => { + it('should trigger all effects when array length is set to 0', () => { const observed: any = reactive([1]) let dummy, record effect(() => { diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index fbb18a22c98..6c0a1a4464e 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -142,7 +142,9 @@ function deleteProperty(target: object, key: string | symbol): boolean { function has(target: object, key: string | symbol): boolean { const result = Reflect.has(target, key) - track(target, TrackOpTypes.HAS, key) + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, TrackOpTypes.HAS, key) + } return result }