Skip to content

Commit

Permalink
remove priorty infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis committed Oct 11, 2024
1 parent a415928 commit 18b3602
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type EventType = keyof typeof eventConfig;
export function useTimings({ time: start, events }: Write) {
const maxLen = Math.max(...events.map((event) => event.time - start));
const sortedEvents = Object.values(events).sort((a, b) => {
const priorityA = eventConfig[a.type as EventType]?.priority ?? Infinity;
const priorityB = eventConfig[b.type as EventType]?.priority ?? Infinity;
const priorityA = eventConfig[a.type as EventType]?.priority;
const priorityB = eventConfig[b.type as EventType]?.priority;
return priorityA - priorityB;
});

Expand Down

0 comments on commit 18b3602

Please sign in to comment.