Skip to content
Permalink
Browse files

Fix: Pass all arguments to handlers

  • Loading branch information
jacoborus committed Feb 3, 2020
1 parent 660cb65 commit b6214f51c919a8974366edb26c26ae9123b682bc
Showing with 4 additions and 4 deletions.
  1. +3 −3 package.json
  2. +1 −1 src/weak-emitter.ts
@@ -1,9 +1,9 @@
{
"name": "weak-emitter",
"version": "4.1.0",
"version": "4.1.1",
"description": "ES6 WeakMap based event emitter (~350 bytes)",
"main": "lib/weak-emitter.js",
"types": "lib/weak-emitter.d.ts",
"main": "./lib/weak-emitter.js",
"types": "./lib/weak-emitter.d.ts",
"scripts": {
"linter": "eslint src/*.js",
"test": "tape -r ts-node/register/transpile-only src/tests.ts",
@@ -17,7 +17,7 @@ export function weakEmitter () {
const handlers = events.get(key) || newEvent(key)
handlers.set(handler, function () {
handlers.delete(handler)
handler(arguments)
handler(...arguments)
})
},

0 comments on commit b6214f5

Please sign in to comment.
You can’t perform that action at this time.