Skip to content

Commit

Permalink
fix toSorted
Browse files Browse the repository at this point in the history
  • Loading branch information
kumpmati committed Apr 17, 2024
1 parent 5336b41 commit 9b00b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/server/database/handlers/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getLinkVisitsPerDay = async (linkId: string): Promise<LinkVisitsPer
current = current.add(1, 'day');
}

return data.toSorted((a, b) => new Date(a.day).getTime() - new Date(b.day).getTime());
return data.sort((a, b) => new Date(a.day).getTime() - new Date(b.day).getTime());
};

export type LinkVisitsPerReferrer = {
Expand Down

0 comments on commit 9b00b31

Please sign in to comment.