Skip to content

Commit

Permalink
chore: remove no_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Aug 13, 2024
1 parent f96fa26 commit 606d86e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions packages/reactivity/src/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export enum EffectFlags {
NOTIFIED = 1 << 3,
DIRTY = 1 << 4,
ALLOW_RECURSE = 1 << 5,
NO_BATCH = 1 << 6,
PAUSED = 1 << 7,
PAUSED = 1 << 6,
}

/**
Expand Down Expand Up @@ -169,9 +168,6 @@ export class ReactiveEffect<T = any>
) {
return
}
if (this.flags & EffectFlags.NO_BATCH && !batchDepth) {
return this.trigger()
}
if (!(this.flags & EffectFlags.NOTIFIED)) {
this.flags |= EffectFlags.NOTIFIED
this.nextEffect = batchedEffect
Expand Down
1 change: 0 additions & 1 deletion packages/runtime-core/src/apiWatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ function doWatch(

let scheduler: EffectScheduler
if (flush === 'sync') {
effect.flags |= EffectFlags.NO_BATCH
scheduler = job as any // the scheduler function gets called directly
} else if (flush === 'post') {
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense)
Expand Down

0 comments on commit 606d86e

Please sign in to comment.