Remove error log for getDomain

This commit is contained in:
Julien Nahum 2024-01-15 16:41:50 +01:00
parent e41929e4c8
commit 47c779fd9a
1 changed files with 2 additions and 2 deletions

4
client/lib/utils.js vendored
View File

@ -61,10 +61,10 @@ export const getHost = function () {
export const getDomain = function (url) {
if (url.includes('localhost')) return 'localhost'
try {
if (!url.startsWith('http')) url = 'https://' + url
return (new URL(url)).hostname
} catch (e) {
console.error('Error extracting domai from: ',url,e)
return null
return url
}
}