dissalow local run

This commit is contained in:
Azgaar 2022-02-06 01:04:11 +03:00 committed by Peter
parent 845245130f
commit 21f95d4b1f
3 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
const version = "1.662"; // generator version const version = "1.662"; // generator version
document.title += " v" + version; document.title += " v" + version;
// Switches to disable/enable logging features // switches to disable/enable logging features
const PRODUCTION = location.hostname && location.hostname !== "localhost" && location.hostname !== "127.0.0.1"; const PRODUCTION = location.hostname && location.hostname !== "localhost" && location.hostname !== "127.0.0.1";
const DEBUG = localStorage.getItem("debug"); const DEBUG = localStorage.getItem("debug");
const INFO = DEBUG || !PRODUCTION; const INFO = DEBUG || !PRODUCTION;

View file

@ -145,7 +145,7 @@ function parseLoadedResult(result) {
const mapVersion = parseFloat(mapData[0].split("|")[0] || mapData[0]); const mapVersion = parseFloat(mapData[0].split("|")[0] || mapData[0]);
return [mapData, mapVersion]; return [mapData, mapVersion];
} catch (error) { } catch (error) {
console.error(error); ERROR && console.error(error);
return [null, null]; return [null, null];
} }
} }

View file

@ -144,7 +144,7 @@ async function saveToDropbox() {
await Cloud.providers.dropbox.save(filename, mapData); await Cloud.providers.dropbox.save(filename, mapData);
tip("Map is saved to your Dropbox", true, "success", 8000); tip("Map is saved to your Dropbox", true, "success", 8000);
} catch (msg) { } catch (msg) {
console.error(msg); ERROR && console.error(msg);
tip("Cannot save .map to your Dropbox", true, "error", 8000); tip("Cannot save .map to your Dropbox", true, "error", 8000);
} }
} }