fix: solve navigator undefined && merge from main

This commit is contained in:
leedom 2023-04-07 13:47:34 +08:00
parent 406ed8a02a
commit 00d45e7cc4

View File

@ -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) {