Skip to content

Commit

Permalink
Fixed minTime on Loader to apply only when loader has scene
Browse files Browse the repository at this point in the history
  • Loading branch information
ekelokorpi committed Jul 17, 2020
1 parent 833b8e9 commit 3d76f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ game.createClass('Loader', 'Scene', {
}

var waitTime = game.Loader.minTime - (game.Timer.time - this._startTime);
if (waitTime > 0) game.Timer.add(waitTime, this.onComplete.bind(this));
if (waitTime > 0 && this.scene) game.Timer.add(waitTime, this.onComplete.bind(this));
else this.onComplete();
},

Expand Down

0 comments on commit 3d76f91

Please sign in to comment.