From f0046ec557bf8d52aaf5cb13cf03ab98450adc0a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 2 Jan 2024 12:10:55 -0300 Subject: do not send extra if empty --- packages/merchant-backoffice-ui/src/utils/table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/merchant-backoffice-ui/src/utils/table.ts') 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( */ export function undefinedIfEmpty< T extends Record | Array, ->(obj: T): T | undefined { +>(obj: T | undefined): T | undefined { if (obj === undefined) return undefined; return Object.values(obj).some((v) => v !== undefined) ? obj : undefined; } -- cgit v1.2.3