Skip to content

Beautiful Open-Source Form Builder

Remove error log for getDomain

Julien Nahum47c779fd9af5
diff --git a/client/lib/utils.js b/client/lib/utils.js
index 4a8b72848..7d3df6fff 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -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
}
}