MAPG-103 reset UI elements in case of error

This commit is contained in:
Bence Pőcze 2020-06-05 19:36:47 +02:00
parent 55a1cd24d6
commit 92fd282184

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) {