Fix bug isRelation guard (#2217)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { isObject, isUndefined } from '@sniptt/guards';
|
||||
import { isNull, isObject, isUndefined } from '@sniptt/guards';
|
||||
|
||||
import { FieldRelationValue } from '../FieldMetadata';
|
||||
|
||||
@ -6,4 +6,4 @@ import { FieldRelationValue } from '../FieldMetadata';
|
||||
export const isFieldRelationValue = (
|
||||
fieldValue: unknown,
|
||||
): fieldValue is FieldRelationValue =>
|
||||
!isUndefined(fieldValue) && isObject(fieldValue);
|
||||
!isUndefined(fieldValue) && (isObject(fieldValue) || isNull(fieldValue));
|
||||
|
||||
Reference in New Issue
Block a user