Skip to content

Commit

Permalink
fix: 🐛 bugfix if no rating
Browse files Browse the repository at this point in the history
  • Loading branch information
gouz committed Apr 18, 2024
1 parent 1514d32 commit 80f66bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "choc",
"version": "0.1.1",
"version": "0.1.2",
"module": "src/index.ts",
"type": "module",
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/DTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const DTO = (
speakers: speakerHash.get(uid)?.name,
...addCompanies,
...addLanguages,
rating: Number(rating.toFixed(2)),
rating: Number((rating ?? "0").toFixed(2)),
loves,
hates,
});
Expand Down Expand Up @@ -115,7 +115,7 @@ export const DTOExport = (
.join(", "),
...addCompanies,
...addLanguages,
rating: Number(rating.toFixed(2)),
rating: Number((rating ?? "0").toFixed(2)),
loves,
hates,
};
Expand Down

0 comments on commit 80f66bd

Please sign in to comment.