Skip to content

Commit

Permalink
fix(vanilla): createSnapshot (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Oct 14, 2024
1 parent b19dec9 commit 487ded5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ const createSnapshotDefault = <T extends object>(
if (refSet.has(value as object)) {
markToTrack(value as object, false) // mark not to track
} else if (proxyStateMap.has(value as object)) {
const [target, ensureVersion] = proxyStateMap.get(
value as object,
) as ProxyState
desc.value = createSnapshotDefault(target, ensureVersion()) as Snapshot<T>
const [target] = proxyStateMap.get(value as object) as ProxyState
desc.value = createSnapshotDefault(target, version) as Snapshot<T>
}
Object.defineProperty(snap, key, desc)
})
Expand Down

0 comments on commit 487ded5

Please sign in to comment.