From 572b9a7bea7f523459240231955b8507f9d2acf3 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Mon, 22 Aug 2016 14:15:33 +0800 Subject: [PATCH] fix scene list --- cocos2d/core/CCGame.js | 2 +- jsb/jsb-game.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 46c36da7ac..4af10c5b8b 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -634,7 +634,7 @@ var game = { modules && (config[CONFIG_KEY.modules] = modules); // Scene parser - this._sceneInfos = this._sceneInfos.concat(config[CONFIG_KEY.scenes]); + this._sceneInfos = config[CONFIG_KEY.scenes] || []; // Collide Map and Group List this.collisionMatrix = config.collisionMatrix || []; diff --git a/jsb/jsb-game.js b/jsb/jsb-game.js index 78f75bd92e..f2b31eba24 100644 --- a/jsb/jsb-game.js +++ b/jsb/jsb-game.js @@ -250,7 +250,7 @@ cc.js.mixin(cc.game, { this.collisionMatrix = config.collisionMatrix || []; // Scene parser - this._sceneInfos = this._sceneInfos.concat(config[CONFIG_KEY.scenes]); + this._sceneInfos = config[CONFIG_KEY.scenes] || []; cc.director.setDisplayStats(this.config[CONFIG_KEY.showFPS]); cc.director.setAnimationInterval(1.0/this.config[CONFIG_KEY.frameRate]);