diff --git a/fe_calckey/frontend/magnetar-common/src/be-api.ts b/fe_calckey/frontend/magnetar-common/src/be-api.ts index 2235410..446a69c 100644 --- a/fe_calckey/frontend/magnetar-common/src/be-api.ts +++ b/fe_calckey/frontend/magnetar-common/src/be-api.ts @@ -36,10 +36,9 @@ function nestedUrlSearchParams(data: any, topLevel: boolean = true): string { .map(encodeURIComponent) .join("&"); - const inner = Object.entries(data).map(([k, v]) => [ - k, - nestedUrlSearchParams(v, false), - ]); + const inner = Object.entries(data) + .filter(([_, v]) => typeof v !== "undefined") + .map(([k, v]) => [k, nestedUrlSearchParams(v, false)]); return new URLSearchParams(inner).toString();