diff --git a/packages/runtime-core/__tests__/components/Suspense.spec.ts b/packages/runtime-core/__tests__/components/Suspense.spec.ts index c6ab0f3fa32..5602b4a7f14 100644 --- a/packages/runtime-core/__tests__/components/Suspense.spec.ts +++ b/packages/runtime-core/__tests__/components/Suspense.spec.ts @@ -609,7 +609,7 @@ describe('Suspense', () => { err instanceof Error ? err.message : `A non-Error value thrown: ${err}` - return true + return false }) return () => diff --git a/packages/runtime-core/__tests__/errorHandling.spec.ts b/packages/runtime-core/__tests__/errorHandling.spec.ts index 47d6c489262..eed67913633 100644 --- a/packages/runtime-core/__tests__/errorHandling.spec.ts +++ b/packages/runtime-core/__tests__/errorHandling.spec.ts @@ -20,7 +20,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'root') - return true + return false }) return () => h(Child) } @@ -58,7 +58,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'root') - return true + return false }) return () => h(Child) } @@ -68,7 +68,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info, 'child') - return true + return false }) return () => h(GrandChild) } @@ -96,7 +96,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -126,7 +126,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -164,7 +164,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -189,7 +189,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -218,7 +218,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -238,7 +238,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -265,7 +265,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -295,7 +295,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -330,7 +330,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child) } @@ -363,7 +363,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { @@ -393,7 +393,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { @@ -431,7 +431,7 @@ describe('error handling', () => { setup() { onErrorCaptured((err, instance, info) => { fn(err, info) - return true + return false }) return () => h(Child, { diff --git a/packages/runtime-core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts index 1823f6b729c..fedb0f83f01 100644 --- a/packages/runtime-core/src/errorHandling.ts +++ b/packages/runtime-core/src/errorHandling.ts @@ -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 } }