Before notify was called from the ReactiveNode context and was calling with the node as this instead of the expected watcher. Instead, set consumerMarkedDirty to a function that wraps notify with a proper call with this.
Also add unit tests for our expected behavior here including closure for an arrow function.
Before
notify
was called from theReactiveNode
context and was calling with the node asthis
instead of the expected watcher. Instead, setconsumerMarkedDirty
to a function that wraps notify with a proper call withthis
.Also add unit tests for our expected behavior here including closure for an arrow function.
This is a follow up after https://github.com/proposal-signals/proposal-signals/pull/146 got closed We are moving forward with different semantics than that one but the bug still needed to be fixed.