Closed christianvogt closed 8 years ago
The check for a matching listener is incorrect. As such a listener cannot be removed.
for (i = listeners.length - 1; i >= 0; i--) { if( listeners[i] === listener ) listeners.splice( i, 1 ); }
The comparison should be against the callback of the listeners object.
for (i = listeners.length - 1; i >= 0; i--) { if( listeners[i].callback === listener ) listeners.splice( i, 1 ); }
Nice catch too! Fixed also in v0.6.1
The check for a matching listener is incorrect. As such a listener cannot be removed.
The comparison should be against the callback of the listeners object.