Skip to content

Commit

Permalink
chore(reactive): revert batch tracker (#3112)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed May 11, 2022
1 parent 67a555c commit 604d74a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/reactive/src/tracker.ts
@@ -1,7 +1,12 @@
import { ReactionStack } from './environment'
import { isFn } from './checkers'
import { Reaction } from './types'
import { disposeBindingReactions, releaseBindingReactions } from './reaction'
import {
batchEnd,
batchStart,
disposeBindingReactions,
releaseBindingReactions,
} from './reaction'

export class Tracker {
private results: any
Expand All @@ -23,11 +28,13 @@ export class Tracker {
if (ReactionStack.indexOf(this.track) === -1) {
releaseBindingReactions(this.track)
try {
batchStart()
ReactionStack.push(this.track)
this.results = tracker()
} finally {
ReactionStack.pop()
this.track._boundary++
batchEnd()
this.track._boundary = 0
}
}
Expand Down

0 comments on commit 604d74a

Please sign in to comment.