What fresh hell is this? Someone decided to nest animations within animations, with timing functions that depend on each other, and then threw in boolean flags named "finished" and "finishedInside" because apparently we're writing code that doubles as an adult film script.
This is the kind of animation code that makes you wake up at 3 AM six months later when the client reports that "sometimes the button jiggles wrong on Samsung devices but only on Tuesdays."
The triple equality check is the cherry on top. Like, yes, let's make absolutely sure we're comparing the exact same type while the rest of this code is playing 4D chess with timing functions.