From 21f95d4b1fa03bc2694d7f442ddb42bf8b99dd56 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 6 Feb 2022 01:04:11 +0300 Subject: [PATCH] dissalow local run --- main.js | 2 +- modules/load.js | 2 +- modules/save.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index b00c2918..434fdba5 100644 --- a/main.js +++ b/main.js @@ -5,7 +5,7 @@ const version = "1.662"; // generator 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 DEBUG = localStorage.getItem("debug"); const INFO = DEBUG || !PRODUCTION; diff --git a/modules/load.js b/modules/load.js index 05af03b9..d9c944c0 100644 --- a/modules/load.js +++ b/modules/load.js @@ -145,7 +145,7 @@ function parseLoadedResult(result) { const mapVersion = parseFloat(mapData[0].split("|")[0] || mapData[0]); return [mapData, mapVersion]; } catch (error) { - console.error(error); + ERROR && console.error(error); return [null, null]; } } diff --git a/modules/save.js b/modules/save.js index 13354f53..1a5b1f5f 100644 --- a/modules/save.js +++ b/modules/save.js @@ -144,7 +144,7 @@ async function saveToDropbox() { await Cloud.providers.dropbox.save(filename, mapData); tip("Map is saved to your Dropbox", true, "success", 8000); } catch (msg) { - console.error(msg); + ERROR && console.error(msg); tip("Cannot save .map to your Dropbox", true, "error", 8000); } }