Skip to content

Commit

Permalink
Fix type errors exposed by TypeScript conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed May 22, 2024
1 parent c48e8f3 commit 3e0350d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static-site/src/components/ListResources/useDataFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function updateCadence(dateObjects) {
return {summary: "rarely", description: `This dataset has been updated ${intervals.length+1} times in the past 2 years.`};
}

const lastUpdateDaysAgo = Math.round(((new Date()) - dateObjects.at(-1))/msInADay);
const lastUpdateDaysAgo = Math.round(((new Date()).getTime() - dateObjects.at(-1))/msInADay);
const median = intervals[Math.floor(intervals.length/2)];
const mad = intervals.map((x) => Math.abs(x-median)).sort((a, b) => a-b)[Math.floor(intervals.length/2)]

Expand Down

0 comments on commit 3e0350d

Please sign in to comment.