From b52738248d957f77a28fc70d692b4592dad74df6 Mon Sep 17 00:00:00 2001 From: Wx-2025 <351320169@qq.com> Date: Sun, 28 Dec 2025 11:35:03 +0800 Subject: [PATCH] Update executor.js --- core/table-system/executor.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/table-system/executor.js b/core/table-system/executor.js index 3777ed7..50582c2 100644 --- a/core/table-system/executor.js +++ b/core/table-system/executor.js @@ -1,4 +1,3 @@ - import { log } from './logger.js'; function insertRow(state, tableIndex, data) { @@ -158,7 +157,10 @@ function parseValue(val) { return JSON.parse(val); } catch (e) { 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) { return val; }