Skip to content

Commit 9a37c4b

Browse files
yeyan1996yyx990803
authored andcommitted
refactor(effect): use includes instead of indexOf (#286)
1 parent 1fbb4d2 commit 9a37c4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/reactivity/src/effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function run(effect: ReactiveEffect, fn: Function, args: any[]): any {
8888
if (!effect.active) {
8989
return fn(...args)
9090
}
91-
if (activeReactiveEffectStack.indexOf(effect) === -1) {
91+
if (!activeReactiveEffectStack.includes(effect)) {
9292
cleanup(effect)
9393
try {
9494
activeReactiveEffectStack.push(effect)

0 commit comments

Comments
 (0)