fix(structuredclone): change

This commit is contained in:
2026-02-28 16:54:50 +08:00
parent 717b7237a2
commit cc9bea54e5
12 changed files with 101 additions and 103 deletions

View File

@@ -2,6 +2,7 @@ import { create } from "zustand"
import { persist } from "zustand/middleware"
import { storage, useLabelStore } from "./store"
import { usePaperStore } from "./usePaperStore"
import { safeClone } from "./utils/clone"
interface RightToolsState {
pathIds: number[]
@@ -94,7 +95,7 @@ export const useRightToolsStore = create(
}
state.pathGroupMap.get(imageId)?.set(groupId, pathIds)
// update LabelData
const data = structuredClone(useLabelStore.getState().label)
const data = safeClone(useLabelStore.getState().label)
// handle delete
if (deleteIds.length) {
let operationIds: any[] = []