diff --git a/cocos2d/core/sprites/CCScale9Sprite.js b/cocos2d/core/sprites/CCScale9Sprite.js index fb6c5c747c..3d1b832ed0 100644 --- a/cocos2d/core/sprites/CCScale9Sprite.js +++ b/cocos2d/core/sprites/CCScale9Sprite.js @@ -32,7 +32,9 @@ var dataPool = { if (!this._pool[length]) { this._pool[length] = [data]; this._lengths.push(length); - this._lengths.sort(); + this._lengths.sort(function(a, b) { + return a - b; + }); } else { this._pool[length].push(data);