mirror of
https://github.com/misode/misode.github.io.git
synced 2026-05-02 21:52:54 +00:00
Fix #4 Compatibility with Microsoft Edge
This commit is contained in:
@@ -55,7 +55,7 @@ function updateSouce() {
|
|||||||
$('#source').removeClass('invalid');
|
$('#source').removeClass('invalid');
|
||||||
try {
|
try {
|
||||||
table = JSON.parse($('#source').val());
|
table = JSON.parse($('#source').val());
|
||||||
} catch {
|
} catch(e) {
|
||||||
if ($('#source').val().length > 0) {
|
if ($('#source').val().length > 0) {
|
||||||
$('#source').addClass('invalid');
|
$('#source').addClass('invalid');
|
||||||
return;
|
return;
|
||||||
@@ -422,7 +422,7 @@ function parseJSONValue(value) {
|
|||||||
if (value.startsWith('"') || value.startsWith('{') || value.startsWith('[')) {
|
if (value.startsWith('"') || value.startsWith('{') || value.startsWith('[')) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(value);
|
return JSON.parse(value);
|
||||||
} catch {
|
} catch(e) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -575,7 +575,7 @@ function updateChancesField(el) {
|
|||||||
parent.chances[i] = 1;
|
parent.chances[i] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch(e) {
|
||||||
parent.chances = [];
|
parent.chances = [];
|
||||||
}
|
}
|
||||||
invalidated();
|
invalidated();
|
||||||
|
|||||||
Reference in New Issue
Block a user