Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Commit

Permalink
fix(fauna): Convert value prop to Date only if of type string (#…
Browse files Browse the repository at this point in the history
…365)

Related to issue #364
  • Loading branch information
gdangelo authored Jan 6, 2022
1 parent daa3143 commit c8dad2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fauna/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const format = {
const newObject: Record<string, unknown> = {}
for (const key in object) {
const value = object[key]
if (value?.value) {
if (value?.value && typeof value.value === 'string') {
newObject[key] = new Date(value.value)
} else {
newObject[key] = value
Expand Down

0 comments on commit c8dad2b

Please sign in to comment.