From 12f2f6bc754c902d0d027835b95dabb41134174d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=ADmon?= Date: Mon, 25 Jul 2022 10:16:58 +0000 Subject: [PATCH] [BUG] java script error in the main process #66 --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5668172..b2a2be1 100644 --- a/main.js +++ b/main.js @@ -606,7 +606,11 @@ function createMapToolWindow(callback) { console.log(err); data = { maptool: { transparentWindow: false } }; } else { - data = JSON.parse(data); + try { + data = JSON.parse(data); + } catch { + data = { maptool: { transparentWindow: false } }; + } if (data == null || data.maptool == null) { data = { maptool: { transparentWindow: false } }; }