Skip to content

Do not store subscribers by function name #156

@ostgals

Description

@ostgals

It leads to a weird situation when different closures attach two different subscribers with the same name. In this case, the second attached subscriber replaces the first one leading to unsubscribing in the first closure.

Possible fixes

Just remove the check if the subscriber is named function or store subscribers as function instances.

Possible workaround until the bug is fixed

Pass anonymous subscribers to the .subscribe method like

nb.subscribe(() => update()) // not nb.subscribe(update)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions