From a5460eb9a99ea907db039742c2e4d32920b0ab6b Mon Sep 17 00:00:00 2001 From: Noam Gaash Date: Mon, 26 Feb 2024 23:46:50 +0200 Subject: [PATCH] fix: exception thrown on `/gaps` (#539) --- src/routes/MainRoute.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/MainRoute.tsx b/src/routes/MainRoute.tsx index a3811cdc..8901e76f 100644 --- a/src/routes/MainRoute.tsx +++ b/src/routes/MainRoute.tsx @@ -44,7 +44,9 @@ export const MainRoute = () => { useEffect(() => { const page = PAGES.find((page) => page.path === location.pathname) if (page && 'searchParamsRequired' in page && page.searchParamsRequired) { - const params = new URLSearchParams({ timestamp: search.timestamp.toString() }) + const params = new URLSearchParams({ + timestamp: search.timestamp?.toString(), + }) if (search.operatorId) { params.set('operatorId', search.operatorId)