Skip to content

Commit 4dc1512

Browse files
committed
fix: onError handlers bug
1 parent e6e3b53 commit 4dc1512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platforms/mp/runtime/lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { handleError } from '../../../core/util/index'
22

33
export function callHook (vm, hook, params) {
44
let handlers = vm.$options[hook]
5-
if (hook === 'onError') {
5+
if (hook === 'onError' && handlers) {
66
handlers = [handlers]
77
}
88

0 commit comments

Comments
 (0)