mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Add eqeqeq rule but require == for null
This commit is contained in:
@@ -20,7 +20,7 @@ export default class EventTarget {
|
||||
if (!(ev instanceof Event)) {
|
||||
throw new Error('Expects an event');
|
||||
}
|
||||
if (this.listeners === null || typeof this.listeners !== 'object') {
|
||||
if (this.listeners == null || typeof this.listeners !== 'object') {
|
||||
this.listeners = {};
|
||||
}
|
||||
const listeners = this.listeners[ev.type];
|
||||
@@ -44,7 +44,7 @@ export default class EventTarget {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new Error('Second argument expects a function');
|
||||
}
|
||||
if (this.listeners === null || typeof this.listeners !== 'object') {
|
||||
if (this.listeners == null || typeof this.listeners !== 'object') {
|
||||
this.listeners = {};
|
||||
}
|
||||
let listeners = this.listeners[eventName];
|
||||
@@ -62,7 +62,7 @@ export default class EventTarget {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new Error('Second argument expects a function');
|
||||
}
|
||||
if (this.listeners === null || typeof this.listeners !== 'object') {
|
||||
if (this.listeners == null || typeof this.listeners !== 'object') {
|
||||
this.listeners = {};
|
||||
}
|
||||
const listeners = this.listeners[eventName];
|
||||
|
||||
Reference in New Issue
Block a user