Skip to content

Commit

Permalink
Fix undefined date serialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Madeorsk committed Sep 30, 2024
1 parent 9cb2bf1 commit 498d25a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sharkitek/core",
"version": "2.1.2",
"version": "2.1.3",
"description": "Sharkitek core models library.",
"keywords": [
"sharkitek",
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Types/DateType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class DateType extends Type<string, Date>

serialize(value: Date): string
{
return value.toISOString();
return value?.toISOString();
}
}

Expand Down

0 comments on commit 498d25a

Please sign in to comment.