Skip to content

Commit

Permalink
fix: solve navigator undefined && merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
leedom92 committed Apr 7, 2023
1 parent 406ed8a commit 00d45e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export function isMobileScreen() {
}

export function isFirefox() {
return /firefox/i.test(navigator.userAgent);
return (
typeof navigator !== "undefined" && /firefox/i.test(navigator.userAgent)
);
}

export function selectOrCopy(el: HTMLElement, content: string) {
Expand Down

0 comments on commit 00d45e7

Please sign in to comment.