Skip to content

Commit 84a7207

Browse files
committed
Debug data clone error
1 parent 187b55a commit 84a7207

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/routers/snapShot.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ export default function updateAndSendSnapShotTree(fiberRoot: FiberRoot): void {
2828
// this postMessage will be sending the most up-to-date snapshot of the current React Fiber Tree
2929
// the postMessage action will be received on the content script to later update the tabsObj
3030
// this will fire off everytime there is a change in test application
31+
// convert the payload from a fiber tree to an object to avoid a data clone error when postMessage processes the argument
32+
const obj = JSON.parse(JSON.stringify(payload));
3133
window.postMessage(
3234
{
3335
action: 'recordSnap',
34-
payload,
36+
payload: obj,
3537
},
3638
'*',
3739
);

0 commit comments

Comments
 (0)