Skip to content

Commit cdf382d

Browse files
authored
Merge pull request #2031 from lumosmind/patch-49
refactoring
2 parents b0464bb + 05e1878 commit cdf382d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/09-classes/07-mixins/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ let eventMixin = {
154154
* this.trigger('select', data1, data2);
155155
*/
156156
trigger(eventName, ...args) {
157-
if (!this._eventHandlers || !this._eventHandlers[eventName]) {
157+
if (!this._eventHandlers?.[eventName]) {
158158
return; // no handlers for that event name
159159
}
160160

0 commit comments

Comments
 (0)