fix(runtime-core/scheduler): allow component render functions to trigger itself

fix #1801
This commit is contained in:
Evan You
2020-08-13 17:27:14 -04:00
parent bc6f252c4a
commit 611437a3fe
4 changed files with 24 additions and 12 deletions

View File

@@ -41,7 +41,8 @@ import {
queuePostFlushCb,
flushPostFlushCbs,
invalidateJob,
flushPreFlushCbs
flushPreFlushCbs,
SchedulerJob
} from './scheduler'
import { effect, stop, ReactiveEffectOptions, isRef } from '@vue/reactivity'
import { updateProps } from './componentProps'
@@ -1429,6 +1430,8 @@ function baseCreateRenderer(
}
}
}, __DEV__ ? createDevEffectOptions(instance) : prodEffectOptions)
// #1801 mark it to allow recursive updates
;(instance.update as SchedulerJob).allowRecurse = true
}
const updateComponentPreRender = (