MAPG-103 reset UI elements in case of error

This commit is contained in:
bence committed 2020-06-09 21:13:16 +02:00
1 parent 55a1cd24d6
commit 92fd282184
1 file changed
+3 -3
+3 -3
View File
@@ -28,14 +28,14 @@
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.responseType = 'json'; xhr.responseType = 'json';
xhr.onload = function () { xhr.onload = function () {
document.getElementById('loading').style.visibility = 'hidden';
document.getElementById('cover').style.visibility = 'hidden';
if (this.response.error) { if (this.response.error) {
//TODO: handle this error //TODO: handle this error
return; return;
} }
document.getElementById('loading').style.visibility = 'hidden';
document.getElementById('cover').style.visibility = 'hidden';
Game.panoId = this.response.panoId; Game.panoId = this.response.panoId;
if (this.response.history) { if (this.response.history) {