Skip to content

Commit

Permalink
fix: rte upload field population
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrodMFlesch committed Jan 24, 2022
1 parent 8451233 commit 8327b5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fields/richText/recurseNestedFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export const recurseNestedFields = ({
showHiddenFields,
}));
}
} else if (typeof data[field.name] !== undefined) {
}
if (typeof data[field.name] !== 'undefined' && typeof field.relationTo === 'string') {
const collection = payload.collections[field.relationTo];
promises.push(populate({
id: data[field.name],
Expand Down

0 comments on commit 8327b5a

Please sign in to comment.