From f5b44acc38908d5245f668d51a8653664d72ff21 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Fri, 7 Aug 2015 13:39:09 -0600 Subject: [PATCH] onAnimationComplete for zero-frame transitions --- src/core/core.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/core.controller.js b/src/core/core.controller.js index a255167bf..1b4cbe395 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -258,7 +258,9 @@ Chart.animationService.addAnimation(this, animation, duration, lazy); } else { this.draw(); - this.options.onAnimationComplete.call(this); + if (this.options.onAnimationComplete && this.options.onAnimationComplete.call) { + this.options.onAnimationComplete.call(this); + } } return this; },