aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/utils/table.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-01-02 12:10:55 -0300
committerSebastian <sebasjm@gmail.com>2024-01-02 12:10:55 -0300
commitf0046ec557bf8d52aaf5cb13cf03ab98450adc0a (patch)
treeec7c812bc4827842c93500a8f032f8c62293edf6 /packages/merchant-backoffice-ui/src/utils/table.ts
parenta5f5a9326b26ca5f54fdad1ca8e58158874027f4 (diff)
downloadwallet-core-f0046ec557bf8d52aaf5cb13cf03ab98450adc0a.tar.xz
do not send extra if empty
Diffstat (limited to 'packages/merchant-backoffice-ui/src/utils/table.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/utils/table.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/merchant-backoffice-ui/src/utils/table.ts b/packages/merchant-backoffice-ui/src/utils/table.ts
index 71358e25f..db2b2021c 100644
--- a/packages/merchant-backoffice-ui/src/utils/table.ts
+++ b/packages/merchant-backoffice-ui/src/utils/table.ts
@@ -51,7 +51,7 @@ export function buildActions<T extends WithId>(
*/
export function undefinedIfEmpty<
T extends Record<string, unknown> | Array<unknown>,
->(obj: T): T | undefined {
+>(obj: T | undefined): T | undefined {
if (obj === undefined) return undefined;
return Object.values(obj).some((v) => v !== undefined) ? obj : undefined;
}