mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 05:25:51 +00:00
Merge branch 'Wx-2025:main' into main
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { log } from './logger.js';
|
import { log } from './logger.js';
|
||||||
|
|
||||||
function insertRow(state, tableIndex, data) {
|
function insertRow(state, tableIndex, data) {
|
||||||
@@ -158,7 +157,10 @@ function parseValue(val) {
|
|||||||
return JSON.parse(val);
|
return JSON.parse(val);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(val.replace(/'/g, '"'));
|
let fixedVal = val.replace(/([{,]\s*)(\d+)(\s*:)/g, '$1"$2"$3');
|
||||||
|
fixedVal = fixedVal.replace(/'/g, '"');
|
||||||
|
|
||||||
|
return JSON.parse(fixedVal);
|
||||||
} catch (e2) {
|
} catch (e2) {
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user