Skip to content

Commit

Permalink
Make clone use structuredClone
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Dec 9, 2023
1 parent 7262d10 commit fed5136
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class MoonbaseSettingsStore extends Flux.Store<any> {
// Required because electron likes to make it immutable sometimes.
// This sucks.
private clone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
return structuredClone(obj);
}
}

Expand Down

0 comments on commit fed5136

Please sign in to comment.