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 a5c8aaf commit 50f1e5eCopy full SHA for 50f1e5e
src/utils/utils.ts
@@ -72,7 +72,7 @@ export function jsonDeserialize<T>(json: string): T {
72
// When using google.protobuf.Value in RPC handler responses, we want to roughly match the behaviour of JSON.stringify
73
// for example in converting Date objects to a UTC string
74
export function jsonSafeAny(key: string, value: any): any {
75
- if (typeof value.toJSON == "function") {
+ if (value !== undefined && value !== null && typeof value.toJSON == "function") {
76
return value.toJSON(key) as any;
77
} else if (globalThis.Array.isArray(value)) {
78
// in place replace
0 commit comments