Skip to content

Commit

Permalink
fix(okam-core): fix ant custom component event $emit error when no de…
Browse files Browse the repository at this point in the history
…clare event handler
  • Loading branch information
wuhy committed Feb 16, 2019
1 parent 486cea0 commit ee7d68b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/okam-core/src/ant/base/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
});

Expand Down

0 comments on commit ee7d68b

Please sign in to comment.