From fd4fbe8c8b492445ab29d26d9648cff4e98d5708 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 7 Oct 2021 20:25:42 -0400 Subject: [PATCH] fix: bug with local API and not passing array / block data --- src/fields/traverseFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/traverseFields.ts b/src/fields/traverseFields.ts index 2146f2fb57..262a7338b6 100644 --- a/src/fields/traverseFields.ts +++ b/src/fields/traverseFields.ts @@ -345,7 +345,7 @@ const traverseFields = (args: Arguments): void => { if (field.type === 'array' || field.type === 'blocks') { const hasRowsOfNewData = Array.isArray(data[field.name]); - const newRowCount = hasRowsOfNewData ? (data[field.name] as Record[]).length : 0; + const newRowCount = hasRowsOfNewData ? (data[field.name] as Record[]).length : undefined; // Handle cases of arrays being intentionally set to 0 if (data[field.name] === '0' || data[field.name] === 0 || data[field.name] === null) {