fix(structuredclone): change
This commit is contained in:
@@ -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[] = []
|
||||
|
||||
Reference in New Issue
Block a user