Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/events.js

Issue 29807560: Issue 6745 - Prefer strict equality operator (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created June 14, 2018, 4:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/elemHide.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/events.js
===================================================================
--- a/lib/events.js
+++ b/lib/events.js
@@ -50,17 +50,17 @@
* @param {function} listener
*/
off(name, listener)
{
let listeners = this._listeners.get(name);
if (listeners)
{
let idx = listeners.indexOf(listener);
- if (idx != -1)
+ if (idx !== -1)
listeners.splice(idx, 1);
}
},
/**
* Adds a one time listener and returns a promise that
* is resolved the next time the specified event is emitted.
* @param {string} name
« no previous file with comments | « lib/elemHide.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld