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]); } });