diff --git a/src/provider.ts b/src/provider.ts index 64499fa..3b305f7 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -203,10 +203,13 @@ function redactResource(action: string, resource: string): string { } function stableJson(value: unknown): string { + if (value === undefined || value === null) { + return "null"; + } if (Array.isArray(value)) { return `[${value.map((v) => stableJson(v)).join(",")}]`; } - if (value && typeof value === "object") { + if (typeof value === "object") { const entries = Object.entries(value as Record).sort( ([a], [b]) => a.localeCompare(b), );