Correct null assigner instead of or assignment
This commit is contained in:
parent
f1c1a02877
commit
a24e32249b
@ -13,7 +13,7 @@ class EventHandler {
|
||||
}
|
||||
|
||||
on(event, listener) {
|
||||
this.events[event] ||= { name: name, listeners: [], callCount: 0 }
|
||||
this.events[event] ??= { name: name, listeners: [], callCount: 0 }
|
||||
this.events[event].listeners.push(listener)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user