diff --git a/skiplang/skjson/ts/binding/src/index.ts b/skiplang/skjson/ts/binding/src/index.ts index 67b08c177..877d69663 100644 --- a/skiplang/skjson/ts/binding/src/index.ts +++ b/skiplang/skjson/ts/binding/src/index.ts @@ -167,7 +167,7 @@ export type Json = /** * Objects containing `Json` values. */ -export type JsonObject = { readonly [key: string]: Json | null }; +export type JsonObject = { readonly [key: string]: Json | null | undefined }; export type Exportable = | null diff --git a/skipruntime-ts/helpers/src/external.ts b/skipruntime-ts/helpers/src/external.ts index baba24dd9..1c8f60b20 100644 --- a/skipruntime-ts/helpers/src/external.ts +++ b/skipruntime-ts/helpers/src/external.ts @@ -16,6 +16,7 @@ export function defaultParamEncoder(params: Json): string { if (typeof params == "object") { const queryParams: { [param: string]: string } = {}; for (const [key, value] of Object.entries(params)) { + if (value === undefined) continue; if (typeof value == "object") queryParams[key] = JSON.stringify(value); else queryParams[key] = value.toString(); }