Skip to content

Commit d80b684

Browse files
Merge pull request #37 from viamrobotics/structuredclone
Replace structuredClone call with state.snapshot
2 parents 032f166 + 8f5af82 commit d80b684

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stupid-pianos-make.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@viamrobotics/svelte-sdk': patch
3+
---
4+
5+
Replace structuredClone call with state.snapshot

src/lib/hooks/robot-clients.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const provideRobotClientsContext = (
103103
Object.keys(lastConfigs)
104104
);
105105

106-
lastConfigs = structuredClone(configs);
106+
lastConfigs = $state.snapshot(configs);
107107

108108
for (const partID of removed) {
109109
disconnect(partID, lastConfigs[partID]);

0 commit comments

Comments
 (0)