fix: bug when clearing relationship field without hasMany: true (#1829)
* fix: bug when clearing relationship field without hasMany: true * fix: checks for null value within function
This commit is contained in:
committed by
GitHub
parent
a10376372a
commit
ed7cfff45c
@@ -297,7 +297,7 @@ export type ValueWithRelation = {
|
||||
}
|
||||
|
||||
export function valueIsValueWithRelation(value: unknown): value is ValueWithRelation {
|
||||
return typeof value === 'object' && 'relationTo' in value && 'value' in value;
|
||||
return value !== null && typeof value === 'object' && 'relationTo' in value && 'value' in value;
|
||||
}
|
||||
|
||||
export type RelationshipValue = (string | number)
|
||||
|
||||
Reference in New Issue
Block a user