Skip to content

Commit 92995c5

Browse files
committed
Fixed a bug of template that it doesn't work when it doesn't add loading.js
1 parent a0a5354 commit 92995c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/js-template-default/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*/
4949

5050
cc.game.onStart = function(){
51-
if(!cc.sys.isNative) //If referenced loading.js, please remove it
51+
if(!cc.sys.isNative && document.getElementById("cocosLoading")) //If referenced loading.js, please remove it
5252
document.body.removeChild(document.getElementById("cocosLoading"));
5353

5454
cc.view.adjustViewPort(true);

0 commit comments

Comments
 (0)