Skip to content

Commit 25bc654

Browse files
committedJan 21, 2022
perf(reactivity): optimize effect run condition
1 parent 4768f26 commit 25bc654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/reactivity/src/effect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class ReactiveEffect<T = any> {
7575
if (!this.active) {
7676
return this.fn()
7777
}
78-
if (!effectStack.includes(this)) {
78+
if (!effectStack.length || !effectStack.includes(this)) {
7979
try {
8080
effectStack.push((activeEffect = this))
8181
enableTracking()

0 commit comments

Comments
 (0)
Please sign in to comment.