js-signals
js-signals copied to clipboard
_bindings.slice() in dispatch() method may not work as intended since slice() returns a shallow copy.
In Signal.prototype.dispatch() method, there is the following line along with the comment:
bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch
but since Array.slice() method returns a shallow copy, does that really work?