Skip to content

Commit ccbb2c6

Browse files
committed
fix: fast-json-stringify do not support replacer
1 parent afd4099 commit ccbb2c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/json_schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fastJson = require('fast-json-stringify')
1+
import fastJson from 'fast-json-stringify'
22

33
const logSchema = {
44
title: 'Log',

src/output_utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const stringifyLog = (log: Record<string, unknown>): string => {
2626
try {
2727
return fastStringifyLog(log)
2828
} catch (e) {
29-
return fastStringifyLog(log, getCircularReplacer())
29+
return JSON.stringify(log, getCircularReplacer())
3030
}
3131
}
3232

0 commit comments

Comments
 (0)