perf(reactivity): optimize effect run condition
This commit is contained in:
parent
4768f26f59
commit
25bc6549eb
@ -75,7 +75,7 @@ export class ReactiveEffect<T = any> {
|
|||||||
if (!this.active) {
|
if (!this.active) {
|
||||||
return this.fn()
|
return this.fn()
|
||||||
}
|
}
|
||||||
if (!effectStack.includes(this)) {
|
if (!effectStack.length || !effectStack.includes(this)) {
|
||||||
try {
|
try {
|
||||||
effectStack.push((activeEffect = this))
|
effectStack.push((activeEffect = this))
|
||||||
enableTracking()
|
enableTracking()
|
||||||
|
Loading…
Reference in New Issue
Block a user