Commit 3b8ec34
events: fix bug listenerCount don't compare wrapped listener
When add listener by once, it will be wrapped into another function.
And when pass listener and there is just one event listener added by
once, it will return 0 even if passed listener equal wrapped event
listener.
Refs: #46523
PR-URL: #48592
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>1 parent 1aa798d commit 3b8ec34Copy full SHA for 3b8ec34
File tree
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
850 | 850 | |
851 | 851 | |
852 | 852 | |
853 | | - |
| 853 | + |
854 | 854 | |
855 | 855 | |
856 | 856 | |
|
Collapse file
test/parallel/test-events-listener-count-with-listener.js
Copy file name to clipboardExpand all lines: test/parallel/test-events-listener-count-with-listener.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
15 | 27 | |
16 | 28 | |
17 | 29 | |
|
0 commit comments