Skip to content

Commit 3e0350d

Browse files
committed
Fix type errors exposed by TypeScript conversion
1 parent c48e8f3 commit 3e0350d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static-site/src/components/ListResources/useDataFetch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function updateCadence(dateObjects) {
163163
return {summary: "rarely", description: `This dataset has been updated ${intervals.length+1} times in the past 2 years.`};
164164
}
165165

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

0 commit comments

Comments
 (0)