We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76669d1 commit bdf5ec9Copy full SHA for bdf5ec9
1 file changed
packages/hypergraph/src/utils/convert-property-value.ts
@@ -44,10 +44,16 @@ export const convertPropertyValue = (
44
if (propertyType.value === 'date') {
45
// Handle case where date is stored as string in the API
46
if (property.time != null) {
47
- return new Date(property.time);
+ const timeDate = new Date(property.time);
48
+ if (!Number.isNaN(timeDate.getTime())) {
49
+ return timeDate;
50
+ }
51
}
52
if (property.string != null && property.string !== '') {
- return new Date(property.string);
53
+ const stringDate = new Date(property.string);
54
+ if (!Number.isNaN(stringDate.getTime())) {
55
+ return stringDate;
56
57
58
return undefined;
59
0 commit comments