Use structuredClone instead of JSON.parse(JSON.stringify()) (S7784)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 00:28:30 +08:00
parent 3768c6e5ec
commit 2b0dadedd4
9 changed files with 32 additions and 32 deletions

View File

@@ -373,7 +373,7 @@ emitter.on("actListData", (data) => {
state.containstTasksData = data;
});
emitter.on("actRadioData", (newData) => {
const data = JSON.parse(JSON.stringify(newData)); // Deep copy the original cases data
const data = structuredClone(newData); // Deep copy the original cases data
const categoryMapping = {
cfmSeqStart: ["Start", "selectCfmSeqStart", "selectCfmSeqEnd"],