Skip to content

Commit e41eff9

Browse files
committed
__proto__ baby
1 parent ea984d5 commit e41eff9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

github-webhook-handler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ function create (options) {
2020
throw new TypeError('must provide a \'secret\' option')
2121

2222
// make it an EventEmitter, sort of
23+
handler.__proto__ = EventEmitter.prototype
2324
EventEmitter.call(handler)
24-
Object.keys(EventEmitter.prototype).forEach(function (k) {
25-
handler[k] = EventEmitter.prototype[k]
26-
})
2725

2826
return handler
2927

0 commit comments

Comments
 (0)