From 4d59f2f7f819e83f01c99b11b4391e975cd5dd96 Mon Sep 17 00:00:00 2001 From: SentienceDEV Date: Sat, 28 Feb 2026 13:05:02 -0800 Subject: [PATCH] fix stable json --- src/provider.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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), );