Skip to content

Commit 6fb9eaf

Browse files
committed
refactor: replace JSON-based deep copy with structuredClone
1 parent 9035436 commit 6fb9eaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

externals/electron-renderer-tracker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ function track(direction, channel, args) {
4646
source: MSG_TYPE.SEND_TO_PANEL,
4747
event,
4848
},
49-
'*',
49+
'*'
5050
);
5151
}
5252

5353
function copyArgs(args) {
5454
try {
55-
return JSON.parse(JSON.stringify(args));
55+
return structuredClone(args);
5656
} catch (err) {
57-
return [`[Could not stringify args: ${err.message}]`];
57+
return [`[Could not clone args: ${err.message}]`];
5858
}
5959
}

0 commit comments

Comments
 (0)