From ee7d68b3f0b71e6eb36072a17cac588cb9f34c5a Mon Sep 17 00:00:00 2001 From: wuhy Date: Sat, 16 Feb 2019 12:38:42 +0800 Subject: [PATCH] fix(okam-core): fix ant custom component event $emit error when no declare event handler --- packages/okam-core/src/ant/base/component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/okam-core/src/ant/base/component.js b/packages/okam-core/src/ant/base/component.js index cddf197d..fec4ef74 100644 --- a/packages/okam-core/src/ant/base/component.js +++ b/packages/okam-core/src/ant/base/component.js @@ -43,7 +43,7 @@ antComponent.methods = Object.assign({}, antComponent.methods, { let eventProp = args[0]; eventProp = 'on' + eventProp.charAt(0).toUpperCase() + eventProp.substr(1); let eventHandler = this.props[eventProp]; - eventHandler.call(this, args[1]); + eventHandler != null && eventHandler.call(this, args[1]); } });