Skip to content

Commit 9cb1022

Browse files
author
SeanLin
committed
Merge pull request cocos2d#831 from Wu-Hao/affineTransform
Fixed cocos2d#1846: bug in AnimationCache that causes interval to not work properly
2 parents 2ce2f30 + 4842a1f commit 9cb1022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/sprite_nodes/CCAnimationCache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ cc.AnimationCache = cc.Class.extend(/** @lends cc.AnimationCache# */{
175175
var animationDict = animations[key];
176176

177177
var loopsTemp = parseInt(animationDict["loops"]);
178-
var loops = (loopsTemp == null) ? 1 : loopsTemp;
178+
var loops = (!isNaN(loopsTemp)) ? 1 : loopsTemp;
179179
var restoreOriginalFrame = (animationDict["restoreOriginalFrame"] && animationDict["restoreOriginalFrame"] == true) ? true : false;
180180
var frameArray = animationDict["frames"];
181181

0 commit comments

Comments
 (0)