Skip to content

Commit

Permalink
fix: bug with local API and not passing array / block data
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikrut committed Oct 8, 2021
1 parent 4432031 commit fd4fbe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/traverseFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>[]).length : 0;
const newRowCount = hasRowsOfNewData ? (data[field.name] as Record<string, unknown>[]).length : undefined;

// Handle cases of arrays being intentionally set to 0
if (data[field.name] === '0' || data[field.name] === 0 || data[field.name] === null) {
Expand Down

0 comments on commit fd4fbe8

Please sign in to comment.