refactor(runtime-core): remove the need for currentSuspense

This commit is contained in:
Evan You
2020-03-30 11:49:51 -04:00
parent 54a11c7bec
commit 573bcb2e11
5 changed files with 10 additions and 16 deletions

View File

@@ -20,7 +20,6 @@ import {
import {
currentInstance,
ComponentInternalInstance,
currentSuspense,
Data,
isInSSRComponentSetup,
recordInstanceBoundEffect
@@ -139,7 +138,6 @@ function doWatch(
}
const instance = currentInstance
const suspense = currentSuspense
let getter: () => any
if (isArray(source)) {
@@ -238,9 +236,7 @@ function doWatch(
}
}
} else {
scheduler = job => {
queuePostRenderEffect(job, suspense)
}
scheduler = job => queuePostRenderEffect(job, instance && instance.suspense)
}
const runner = effect(getter, {