Fix sanitizeOptionalJson return type

This commit is contained in:
Mohamed Boudra
2025-12-25 12:30:27 +07:00
parent 8261910c37
commit c771fd986d
2 changed files with 11 additions and 19 deletions
@@ -195,7 +195,14 @@ function sanitizeOptionalJson(value: unknown): JsonValue | undefined {
}
return Object.keys(result).length ? result : undefined;
}
return value;
if (
typeof value === "string" ||
typeof value === "number" ||
typeof value === "boolean"
) {
return value;
}
return undefined;
}
function isJsonObject(