From 22e227eaa039eaa7994319b8f83eb0ba4c5feb46 Mon Sep 17 00:00:00 2001 From: fire332 <96039230+fire332@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:02:11 -0700 Subject: [PATCH] fix: clone in `stringify` hook to work around frozen objects --- src/hooks/json-stringify.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/json-stringify.ts b/src/hooks/json-stringify.ts index 1919aec5..e91bd796 100644 --- a/src/hooks/json-stringify.ts +++ b/src/hooks/json-stringify.ts @@ -15,6 +15,7 @@ function stringify( space?: string | number ): string { if (!isPrimitive(value)) { + value = structuredClone(value); // TODO: add below to a dump-level logger // console.debug('JSON.stringify', value, replacer, space);