fix: update removing a relationship with null (#1056)

This commit is contained in:
Dan Ribbens
2022-09-02 15:21:09 -04:00
committed by GitHub
parent 254636167d
commit 44b0073834
2 changed files with 13 additions and 1 deletions

View File

@@ -252,7 +252,7 @@ export const relationship: Validate<unknown, unknown, RelationshipField> = async
return defaultMessage;
}
if (!canUseDOM && typeof value !== 'undefined') {
if (!canUseDOM && typeof value !== 'undefined' && value !== null) {
const values = Array.isArray(value) ? value : [value];
const invalidRelationships = values.filter((val) => {