From 8a8e0cacd70ac77157dba96240cb7442e45d1d2f Mon Sep 17 00:00:00 2001 From: Misode Date: Sat, 3 Aug 2019 17:02:10 +0200 Subject: [PATCH] Fix #4 Compatibility with Microsoft Edge --- model.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model.js b/model.js index a6192fe4..11820cea 100644 --- a/model.js +++ b/model.js @@ -55,7 +55,7 @@ function updateSouce() { $('#source').removeClass('invalid'); try { table = JSON.parse($('#source').val()); - } catch { + } catch(e) { if ($('#source').val().length > 0) { $('#source').addClass('invalid'); return; @@ -422,7 +422,7 @@ function parseJSONValue(value) { if (value.startsWith('"') || value.startsWith('{') || value.startsWith('[')) { try { return JSON.parse(value); - } catch { + } catch(e) { return value; } } @@ -575,7 +575,7 @@ function updateChancesField(el) { parent.chances[i] = 1; } } - } catch { + } catch(e) { parent.chances = []; } invalidated();