refactoring

more readable and more modern way
This commit is contained in:
Mustafa Kemal Tuna 2020-07-30 00:32:44 +03:00 committed by GitHub
parent b0464bb32c
commit 05e1878b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}