Skip to content

Commit

Permalink
parse the index as number using parseint instead of casting
Browse files Browse the repository at this point in the history
Signed-off-by: chinodesuuu <[email protected]>
  • Loading branch information
sr229 committed Apr 10, 2024
1 parent 2bdc8de commit 77b19ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Please report this IDs to the author ${[...unknownIds.values()].join(", ")}`,
return {
url,
site: name,
index: id as any as number, // These are actually numbers but they're typed as strings so they can be used to select from the sites map
index: parseInt(id), // These are actually numbers but they're typed as strings so they can be used to select from the sites map
similarity: Number(similarity),
thumbnail,
authorName,
Expand Down

0 comments on commit 77b19ca

Please sign in to comment.