mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 00:38:46 +00:00
Fix #4 Compatibility with Microsoft Edge
This commit is contained in:
6
model.js
6
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();
|
||||
|
||||
Reference in New Issue
Block a user