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

Unified Diff: lib/filterNotifier.js

Issue 29729594: Noissue - Use Map to store EventEmitter listeners (Closed)
Patch Set: Avoid calling .get directly after .has Created April 3, 2018, 5:26 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/events.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterNotifier.js
diff --git a/lib/filterNotifier.js b/lib/filterNotifier.js
index 15d9fe9afd5f7067a47b2ae3760f83e6bacc2bbb..00f4d5861400287d0e99c99fc38f08cc2964bfc0 100644
--- a/lib/filterNotifier.js
+++ b/lib/filterNotifier.js
@@ -47,7 +47,7 @@ exports.FilterNotifier = Object.create(new EventEmitter(), desc({
*/
addListener(listener)
{
- let listeners = this._listeners[CATCH_ALL];
+ let listeners = this._listeners.get(CATCH_ALL);
if (!listeners || listeners.indexOf(listener) == -1)
this.on(CATCH_ALL, listener);
},
« no previous file with comments | « lib/events.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld