Closed Ramonacus closed 11 years ago
Related to it, there is also an issue in the publish
method. If in the callback of any notification we are removing a subscription, the publish method will fail in a similar fashion as stated above.
I would suggest either iterating in reverse order or storing the callbacks in another array to launch the first array has been completely iterated over.
Thanks Ramonacus this issue has been fixed in version 3.1.3
:)
There is a bug in the
unsusbcribeFrom
method: when iterating over the array we eventually remove an element but without updating the index or length variables. This causes an element in the array to be skipped and creates a call over an undefined array index.I would suggest iterating in reverse order.