angular-scroll
angular-scroll copied to clipboard
Guard against last minute removal of toBeActive spy
Since the broadcast of becameInactive
is synchronous, it's possible for the toBeActive
spy to be removed by client code just before it gets activated. This change guards against this (admittedly extremely rare) scenario by treating the spy as if though it didn't exist in the first place. Note that it's possible that another spy should've been selected instead, then, but since the condition is so rare it's probably OK to wait until the next interval fires to recompute the actual active spy.
Thanks for your PR! Can you look into why the test is failing?
I'm mystified at the failing tests. They all pass on my machine (against Chrome 50), and the failure appears to be in an area completely unrelated to the change I made (a context can't be found). Is it possible to force the tests to rerun, in case this is some kind of transient?
Reran with same results, I'll have to look into the errors which might be unrelated. Can I ask you to follow the style and put the statement in { }
?
Oops, fixed. The joys of working on multiple projects with different styles. :stuck_out_tongue_closed_eyes: