refactoring
more readable and more modern way
This commit is contained in:
parent
b0464bb32c
commit
05e1878b3d
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ let eventMixin = {
|
|||
* this.trigger('select', data1, data2);
|
||||
*/
|
||||
trigger(eventName, ...args) {
|
||||
if (!this._eventHandlers || !this._eventHandlers[eventName]) {
|
||||
if (!this._eventHandlers?.[eventName]) {
|
||||
return; // no handlers for that event name
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue