mirror of https://github.com/vuejs/core.git
chore(errorHandling): directly return value in callWithErrorHandling function (#10315)
This commit is contained in:
parent
b8be99018c
commit
5f7a0a08b2
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue