Skip to content

Commit

Permalink
[GCOM-1307] optimize Dyn Row
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaS98 authored and paales committed Jan 15, 2024
1 parent 8c543e6 commit a5e47df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hygraph-dynamic-rows/lib/hygraphDynamicRows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a5e47df

Please sign in to comment.