From: Tanner Linsley Date: Fri, 7 Aug 2015 19:39:09 +0000 (-0600) Subject: onAnimationComplete for zero-frame transitions X-Git-Tag: 2.0.0-alpha4~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b44acc38908d5245f668d51a8653664d72ff21;p=thirdparty%2FChart.js.git onAnimationComplete for zero-frame transitions --- 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; },