You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to select values with type date, if the value is undefined.
On selection the mutateRowTypes function is called. In this function columns with type date will be converter to ISOString on selection: new Date(useObj[m.key]).toISOString();
If useObj[m.key] returns undefined, an error is thrown: RangeError: Invalid Date
Is there a reason why an ISODate is returned instead of Date type? I think there should be a conversion to ISODate on insert and a conversion to Date on select.
If I'm wrong, please insert an undefined check before using new Date()
Meanwhile I will try to use a "custom type" handling
It is not possible to select values with type date, if the value is undefined.
On selection the mutateRowTypes function is called. In this function columns with type date will be converter to ISOString on selection: new Date(useObj[m.key]).toISOString();
If useObj[m.key] returns undefined, an error is thrown: RangeError: Invalid Date
See:
Nano-SQL/packages/Core/src/utilities.ts
Line 437 in af74705
Is there a reason why an ISODate is returned instead of Date type? I think there should be a conversion to ISODate on insert and a conversion to Date on select.
If I'm wrong, please insert an undefined check before using new Date()
Meanwhile I will try to use a "custom type" handling
(Btw: The interface describes onInsert and onSelect, but I cannot find any use of onInsert?)
Im using nanosql with IndexedDB
"@nano-sql/core": "^2.3.7",
The text was updated successfully, but these errors were encountered: