Skip to content

Commit

Permalink
fix(vue): suppress callback error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Oct 5, 2024
1 parent 2a6ff9f commit 678da8b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions unstable/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class VueEffectScope extends EffectScope {

stop() {
super.stop();
for (const cb of this.onDispose) {
cb();
}
this.onDispose.forEach(cb => cb());
}
}

Expand Down Expand Up @@ -78,12 +76,6 @@ class VueComputed<T = any> extends Computed<T> {
}

export class ReactiveEffect extends Effect {
onDispose: (() => void)[] = [];

constructor(fn: () => void) {
super(fn);
}

get dirty() {
if (this.versionOrDirtyLevel === DirtyLevels.MaybeDirty) {
Subscriber.resolveMaybeDirty(this);
Expand All @@ -97,9 +89,6 @@ export class ReactiveEffect extends Effect {

stop() {
Subscriber.clearTrack(this);
for (const cb of this.onDispose) {
cb();
}
}
}

Expand Down

0 comments on commit 678da8b

Please sign in to comment.