mirror of https://github.com/vuejs/core.git
fix(runtime-core): prevent updating instance if it's already the current instance
This commit is contained in:
parent
5a6e98ca32
commit
ffbe87e7a3
|
@ -760,7 +760,10 @@ if (__SSR__) {
|
|||
}
|
||||
}
|
||||
|
||||
export const setCurrentInstance = (instance: ComponentInternalInstance) => {
|
||||
export const setCurrentInstance = (
|
||||
instance: ComponentInternalInstance,
|
||||
): (() => void) => {
|
||||
if (currentInstance === instance) return NOOP
|
||||
const prev = currentInstance
|
||||
internalSetCurrentInstance(instance)
|
||||
instance.scope.on()
|
||||
|
|
Loading…
Reference in New Issue