.off behaves incorrectly
See original GitHub issueTest case:
const emitter = dush()
const handler1 = () => { console.log('a') }
const handler2 = () => { console.log('a') }
emitter.on('a', handler1)
emitter.on('a', handler2)
emitter.off('a', handler1)
What is expected?
handler2 should not be removed
What is actually happening?
handler2 is removed because the lib uses fn.toString() to identify a function and source code of both functions looks the same
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
behave incorrect or behave incorrectly? - TextRanch
Title: CGIRequestHandler behave incorrectly with query component consisting mutliple ? Type: behavior, Stage: resolved. Components: Library .
Read more >definition of misbehaves by The Free Dictionary
To behave badly. v. tr. To behave in an inappropriate way: The children misbehaved themselves at... ... 2. to conduct (oneself) badly or...
Read more >How to Handle a Coworker's Bad Behavior the Right Way
“You're going in asking for their advice, as opposed to pointing out what they're doing wrong.” First: Go to your co-worker and frame...
Read more >Handling Bad Behavior in Public Places: Alternatives…
Six times out of ten, that works; he becomes better behaved. This method takes longer, needless to say, than something like the shoulder...
Read more >How to correct children's bad behavior - YouTube
Punishments don't address the root of the problem --what you want your ... When your child understands what they are to get out...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was using this before ;d
But anyway I’m not hard about that, so PR is welcome.
(Oh, I should definitely update the repo boilerplate and stuff (oh god, there’s no automatic publish and release here?! so it’s really old of haha) ;d But if you are okey with that, great!)
@kouts, sorry, not for now. I can come back in few days and look into an update. I’m switching and upgrading machines now.