Update AnimationHandler.js

Fixes Issue #5516