diff --git a/packages/runtime-core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts index a1ed69cc3c2..041eb123938 100644 --- a/packages/runtime-core/src/errorHandling.ts +++ b/packages/runtime-core/src/errorHandling.ts @@ -66,13 +66,11 @@ export function callWithErrorHandling( type: ErrorTypes, args?: unknown[], ) { - let res try { - res = args ? fn(...args) : fn() + return args ? fn(...args) : fn() } catch (err) { handleError(err, instance, type) } - return res } export function callWithAsyncErrorHandling(