Return null results in a unwanted space

When developing a Shopify customer account extension for the ORDER_STATUS2 placement, I encountered an issue where returning null results in an unwanted gap between items.

How can I resolve this? Is there an alternative value I should return to prevent the extension from rendering without leaving a gap?

Code:

if (!nameMetafield?.value) {
  return null;
}

Current result

Desired result

Hi Brecht,

I’ve connected with our internal team and this bug is on their radar to address. I don’t have an ETA to share, but I’ll update here once this is resolved.

1 Like