Skip to content

Commit

Permalink
[fixup] add handler.has for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
apapirovski committed Nov 19, 2017
1 parent e478850 commit 63c4741
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ const proxyEventsHandler = {
getPrototypeOf() {
return null;
},
has({ emitter }, prop) {
const events = emitter[kEvents];
if (events === undefined)
return false;
if (typeof prop !== 'string' && typeof prop !== 'symbol')
prop = String(prop);
return events.has(prop);
},
ownKeys({ emitter }) {
const events = emitter[kEvents];
if (events === undefined)
Expand Down

0 comments on commit 63c4741

Please sign in to comment.