fix(runtime-core): make errorCaptured return value handling consistent with Vue 2 (#2289)

fix #2267
This commit is contained in:
ᴜɴвʏтᴇ
2020-10-06 05:37:26 +08:00
committed by GitHub
parent ea1f87eabf
commit 4d20ac8173
3 changed files with 19 additions and 17 deletions

View File

@@ -113,7 +113,9 @@ export function handleError(
const errorCapturedHooks = cur.ec
if (errorCapturedHooks) {
for (let i = 0; i < errorCapturedHooks.length; i++) {
if (errorCapturedHooks[i](err, exposedInstance, errorInfo)) {
if (
errorCapturedHooks[i](err, exposedInstance, errorInfo) === false
) {
return
}
}