Skip to content

Commit 1871784

Browse files
committed
Fixik
1 parent 3e0f5af commit 1871784

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

services/utils/general.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const getShortNamespaceID = (id) => {
4141
}
4242

4343
export const shortHash = (hash) => {
44+
if (!hash) return ""
45+
4446
return `${hash.slice(0, 4).toUpperCase()} ••• ${hash.slice(-4).toUpperCase()}`
4547
}
4648

@@ -104,7 +106,7 @@ export const isMobile = () => {
104106

105107
return (
106108
REGEX_MOBILE1.test(userAgent) ||
107-
REGEX_MOBILE2.test(userAgent.slice(0, 4)) ||
109+
REGEX_MOBILE2.test(userAgent?.slice(0, 4)) ||
108110
(typeof window !== "undefined" && window.innerWidth < 1300)
109111
)
110112
}

0 commit comments

Comments
 (0)