Wrong behaviour in Button view setter.
slavatroitsky opened this issue · comments
slavatroitsky commented
Hey!
Please prove me wrong. If I set new view, I expect that events from old one will be disconnected. But in code I see that you are trying to disconnect events from new view I've just passed.
May be that should look like:
if (wasItInitiated) this.disconnectEvents(this._view);
Or
if (wasItInitiated) this.disconnectEvents(this.view);
Instead in code:
if (wasItInitiated) this.disconnectEvents(view);