Skip to content

Commit

Permalink
toSorted issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mnsrulz committed Nov 3, 2024
1 parent cc95272 commit 01fdfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/tradierService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const getEarningDates = async (symbol: string) => {
// .filter(j => j != undefined)
//.filter(j => j.event_type == 14)
.filter(j => j && j.event_status == 'Confirmed' && j.event.includes('Quarter Earnings Result')) //should there a better way to filter?
.toSorted((j, k) => j.begin_date_time.localeCompare(k.begin_date_time))
.sort((j, k) => j.begin_date_time.localeCompare(k.begin_date_time))
.map(({ begin_date_time, event_type, event }) => ({ begin_date_time, event_type, event })); //9

return earnings;
Expand Down

0 comments on commit 01fdfac

Please sign in to comment.