Fixed bug with EventBinding which gets destroyed mid execution - removed logic that was already executed either through binding destroy call or dispatcher destroy call

Fixed issue where comparison was performed instead of assignment
This commit is contained in:
Pavle Goloskokovic 2018-01-05 19:38:51 +01:00
parent 78c74739fc
commit 51aaa3e35a

View file

@ -190,10 +190,6 @@ var EventBinding = new Class({
// All done, tidy the list in case there were any pending events added
this.tidy();
}
else if (this.state === CONST.DISPATCHER_DESTROYED)
{
this.dispatcher.delete(this.type);
}
else
{
// All done, just purge the list
@ -246,7 +242,7 @@ var EventBinding = new Class({
}
else if (this.active[i].state === CONST.LISTENER_PENDING)
{
this.active[i].state === CONST.LISTENER_ACTIVE;
this.active[i].state = CONST.LISTENER_ACTIVE;
added++;
}