Skip to content

Commit

Permalink
Don't access navigator in SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Sep 13, 2024
1 parent 0c48815 commit e8ee732
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/landing/src/routes/docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ function Search() {
<div class="ms-auto inline-flex gap-0.5">
<kbd class="rounded-md border bg-fd-background px-1.5">
<Show
when={navigator.platform.toUpperCase().indexOf("MAC") >= 0}
when={
typeof navigator !== "undefined" &&
navigator.platform.toUpperCase().indexOf("MAC") >= 0
}
fallback="Ctrl"
>
Expand Down

0 comments on commit e8ee732

Please sign in to comment.