Skip to content

Commit 2414213

Browse files
authored
Merge pull request #345 from Meituan-Dianping/bugfix-error-handlers
Bugfix error handlers
2 parents ad27484 + 4dc1512 commit 2414213

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)