Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
rudyxu1102 committed Feb 23, 2023
1 parent c75a29a commit 202922b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/__tests__/apiWatch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ describe('api: watch', () => {
// #7030
it('should not fire on child component unmount w/ flush: pre', async () => {
const visible = ref(true)
const cb = jest.fn()
const cb = vi.fn()
const Parent = defineComponent({
props: ['visible'],
render() {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-core/src/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ export function flushPreFlushCbs(
for (; i < queue.length; i++) {
const cb = queue[i]
if (cb && cb.pre) {
if (__DEV__ && checkRecursiveUpdates(seen!, cb)) {
if (instance && cb.id !== instance.uid) {
continue
}
if (instance && cb.id !== instance.uid) {
if (__DEV__ && checkRecursiveUpdates(seen!, cb)) {
continue
}
queue.splice(i, 1)
Expand Down

0 comments on commit 202922b

Please sign in to comment.