We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd43702 commit a8a5bb6Copy full SHA for a8a5bb6
sites/svelte-5-preview/src/lib/Output/srcdoc/index.html
@@ -274,7 +274,22 @@
274
275
function stringify(args) {
276
try {
277
- return JSON.stringify(args);
+ return JSON.stringify(args, (key, value) => {
278
+ // if we don't do this, our Set/Map from svelte/reactivity would show up wrong in the console
279
+ if (value instanceof Map) {
280
+ return {
281
+ type: 'Map',
282
+ value
283
+ };
284
+ }
285
+ if (value instanceof Set) {
286
287
+ type: 'Set',
288
289
290
291
+ return value;
292
+ });
293
} catch (error) {
294
return null;
295
}
0 commit comments