diff --git a/public/static/js/game.js b/public/static/js/game.js index 0305be2..4145750 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -28,14 +28,14 @@ var xhr = new XMLHttpRequest(); xhr.responseType = 'json'; xhr.onload = function () { + document.getElementById('loading').style.visibility = 'hidden'; + document.getElementById('cover').style.visibility = 'hidden'; + if (this.response.error) { //TODO: handle this error return; } - document.getElementById('loading').style.visibility = 'hidden'; - document.getElementById('cover').style.visibility = 'hidden'; - Game.panoId = this.response.panoId; if (this.response.history) {