Skip to content

Commit

Permalink
Fix event name on first parameter of wild card
Browse files Browse the repository at this point in the history
  • Loading branch information
StefansArya committed Sep 13, 2020
1 parent 2c2b9f2 commit bf24dc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ There are some internal event that may be useful.

|EventName|Arguments|Description|
|---|---|---|
|`*`|...|Wildcards event, everytime `emit` was called|
|`*`|EventName, ...|Wildcards event, everytime `emit` was called|

```js
obj.on('*', function(...){
// Do stuff
// Do stuff
});
```

Expand Down
2 changes: 1 addition & 1 deletion eventpine.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class EventPine{
if(this.events._any !== void 0
&& a !== EventPine.ignoreInternal
&& eventName !== '_any')
this.emit.call(this, '_any', a,b,c,d,e);
this.emit.call(this, '_any', eventName, a,b,c,d);

var evs = this.events[eventName];
if(evs === void 0 || evs.length === 0)
Expand Down

0 comments on commit bf24dc2

Please sign in to comment.