fix warnings

This commit is contained in:
Bekbolsun
2024-02-14 14:45:36 +06:00
parent 1a9dc0da82
commit 8b349c0350
5 changed files with 20 additions and 27 deletions

View File

@@ -110,8 +110,7 @@ export const getReferrerAppUrl = () => {
if (!window.document.referrer) return ''
try {
const u = new URL(window.document.referrer.toLocaleLowerCase())
if (u.hostname != DOMAIN && !u.hostname.endsWith("."+DOMAIN))
return u.origin
if (u.hostname !== DOMAIN && !u.hostname.endsWith('.' + DOMAIN)) return u.origin
} catch {}
return ''
}