Skip to content

Commit

Permalink
fix: remove nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Tsipotan committed Feb 29, 2024
1 parent b7ca3b9 commit 601e01b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ export const Routes: React.FC<RoutesProps> = ({
}

try {
const {data, meta = {}} =
(await loadRouteData({pathname, routes, context})) ?? {}
const {data, meta = {}} = await loadRouteData({
pathname,
routes,
context
})

if (scrollToTop && isBlockedMode) {
window.scrollTo(0, 0)
Expand Down

0 comments on commit 601e01b

Please sign in to comment.