From: Tamás Date: Thu, 23 Jun 2016 15:40:21 +0000 (+0200) Subject: Fix broken animations, if using polyfills for es6/7 proposals (in this case String... X-Git-Tag: 2.3.7~27^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb80329efb0ea3aa549d6faaf6a468656a8dcad8;p=svg.js.git Fix broken animations, if using polyfills for es6/7 proposals (in this case String.at()) --- diff --git a/src/fx.js b/src/fx.js index 9238e2b..fec174a 100644 --- a/src/fx.js +++ b/src/fx.js @@ -543,7 +543,7 @@ SVG.FX = SVG.invent({ for(i in s.animations){ at = [].concat(s.animations[i]).map(function(el){ - return el.at ? el.at(s.ease(self.pos), self.pos) : el + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el }) target[i].apply(target, at) @@ -554,7 +554,7 @@ SVG.FX = SVG.invent({ for(i in s.attrs){ at = [i].concat(s.attrs[i]).map(function(el){ - return el.at ? el.at(s.ease(self.pos), self.pos) : el + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el }) target.attr.apply(target, at) @@ -565,7 +565,7 @@ SVG.FX = SVG.invent({ for(i in s.styles){ at = [i].concat(s.styles[i]).map(function(el){ - return el.at ? el.at(s.ease(self.pos), self.pos) : el + return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el }) target.style.apply(target, at)