Skip to content

Commit

Permalink
[fixup] don't create Map on handler.get call
Browse files Browse the repository at this point in the history
  • Loading branch information
apapirovski committed Nov 19, 2017
1 parent 63c4741 commit 2f77aa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ const proxyEventsHandler = {
return events === undefined ? false : emitter[kEvents].delete(prop);
},
get({ emitter }, prop) {
let events = emitter[kEvents];
const events = emitter[kEvents];
if (events === undefined)
events = emitter[kEvents] = new Map();
return;
if (typeof prop !== 'string' && typeof prop !== 'symbol')
prop = String(prop);
return events.get(prop);
Expand Down

0 comments on commit 2f77aa6

Please sign in to comment.