mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-03 01:34:08 +03:00
fix: allow null value for number and date (#1472)
This commit is contained in:
parent
f332c3bee2
commit
cbcb49cd1e
@ -100,7 +100,7 @@ export type FieldMetadata =
|
||||
export type FieldTextValue = string;
|
||||
|
||||
export type FieldChipValue = string;
|
||||
export type FieldDateValue = string;
|
||||
export type FieldDateValue = string | null;
|
||||
export type FieldPhoneValue = string;
|
||||
export type FieldURLValue = string;
|
||||
export type FieldNumberValue = number | null;
|
||||
|
@ -5,8 +5,7 @@ export function isFieldDateValue(
|
||||
fieldValue: unknown,
|
||||
): fieldValue is FieldDateValue {
|
||||
return (
|
||||
fieldValue !== null &&
|
||||
fieldValue !== undefined &&
|
||||
typeof fieldValue === 'string'
|
||||
fieldValue === null ||
|
||||
(fieldValue !== undefined && typeof fieldValue === 'string')
|
||||
);
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ export function isFieldNumberValue(
|
||||
fieldValue: unknown,
|
||||
): fieldValue is FieldNumberValue {
|
||||
return (
|
||||
fieldValue !== null &&
|
||||
fieldValue !== undefined &&
|
||||
typeof fieldValue === 'number'
|
||||
fieldValue === null ||
|
||||
(fieldValue !== undefined && typeof fieldValue === 'number')
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user