Skip to content

Commit

Permalink
Fix handling of units query parameter (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Aug 18, 2024
1 parent 4821074 commit 68b61eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const UNITS_QUERY = "units";

setCurrentUnitsGetter(() => {
const queryParams = decodeQueryString(location.search);
const query = queryParams.format ? unitsValidator.safeParse(queryParams[UNITS_QUERY]) : undefined;
const query = queryParams[UNITS_QUERY] ? unitsValidator.safeParse(queryParams[UNITS_QUERY]) : undefined;
return query?.success ? query.data : cookies[UNITS_COOKIE];
});

Expand Down

0 comments on commit 68b61eb

Please sign in to comment.