Fix some types after refactoring on main branch.

This commit is contained in:
baldo 2022-07-21 18:44:52 +02:00
parent d53e45cd81
commit edc5c20fdb
3 changed files with 11 additions and 10 deletions
frontend/src/components/nodes

View file

@ -202,7 +202,7 @@ function buildNodesFilter(): NodesFilter {
return nodesFilter;
}
let lastSearchTimestamp: UnixTimestampMilliseconds = 0;
let lastSearchTimestamp: UnixTimestampMilliseconds = 0 as UnixTimestampMilliseconds;
let searchTimeout: NodeJS.Timeout | undefined = undefined;
let lastSearchTerm = "";
@ -221,7 +221,8 @@ function doThrottledSearch(): void {
return
}
const now: UnixTimestampMilliseconds = Date.now();
// TODO: Share utils.
const now: UnixTimestampMilliseconds = Date.now() as UnixTimestampMilliseconds;
if (now - SEARCH_THROTTLE_DELAY_MS >= lastSearchTimestamp) {
lastSearchTimestamp = now;
doSearch();