Skip to content

Commit 4842a1f

Browse files
committed
Fixed a bug in AnimationCache that causes interval to not work properly
1 parent 7b38193 commit 4842a1f

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)