From a5e47df9f84c591f148717b6f2a5a3f4e23aee84 Mon Sep 17 00:00:00 2001 From: Joshua Bolk Date: Wed, 6 Dec 2023 15:20:02 +0100 Subject: [PATCH] [GCOM-1307] optimize Dyn Row --- packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts b/packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts index 5993a71dd2..1d52a95cc1 100644 --- a/packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts +++ b/packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts @@ -126,7 +126,7 @@ export async function hygraphDynamicRows( const { placement, target, rows, row } = dynamicRow if (!rows && !row) return - const rowsToMerge = rows ?? [row] + const rowsToMerge = rows.length > 0 ? rows : [row] if (!target) { if (placement === 'BEFORE') content.unshift(...rowsToMerge)