Adaptation of previous changes to the change from 61241e7 (null instead of undefined as the initial value)

This commit is contained in:
Michał Zielański
2020-06-24 09:54:56 +02:00
parent 61241e7f90
commit 235babfd7f
4 changed files with 12 additions and 7 deletions
+4 -4
View File
@@ -40,19 +40,19 @@ class Target extends Disposable {
/**
* @private
* @type {Object<string, number>}
* @type {?Object<string, number>}
*/
this.pendingRemovals_ = null;
/**
* @private
* @type {Object<string, number>}
* @type {?Object<string, number>}
*/
this.dispatching_ = null;
/**
* @private
* @type {Object<string, Array<import("../events.js").Listener>>}
* @type {?Object<string, Array<import("../events.js").Listener>>}
*/
this.listeners_ = null;
}
@@ -143,7 +143,7 @@ class Target extends Disposable {
* @return {Array<import("../events.js").Listener>|undefined} Listeners.
*/
getListeners(type) {
return this.listeners_ && this.listeners_[type];
return (this.listeners_ && this.listeners_[type]) || undefined;
}
/**