Skip to content

Commit

Permalink
More .search can be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiash98 committed Nov 16, 2023
1 parent 1ef10f7 commit c1375a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/kvarteret/pages/events/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const PracticalInformationLine = ({
url?: string;
}) => {
if (typeof window !== "undefined") {
const urlParams = new URLSearchParams(window.location.search);
const urlParams = new URLSearchParams(window.location?.search ?? "");
const myParam = urlParams.get("startDate");
if (title === "Tidspunkt" && myParam) {
const time = text.split("-")[0].split("kl.")[1];
Expand Down

0 comments on commit c1375a2

Please sign in to comment.