Fixed site domain for FirstPromoter

no issue

Removes http(s) and trailing slashes from FirstPromoter site URL
This commit is contained in:
Rish 2021-01-18 11:44:47 +05:30
parent 569c94272c
commit a09ff2ca5c

View File

@ -181,7 +181,7 @@ export const getSupportAddress = ({site}) => {
export const getSiteDomain = ({site}) => {
try {
return (new URL(site.url)).origin;
return ((new URL(site.url)).origin).replace(/^http(s?):\/\//, '').replace(/\/$/, '');
} catch (e) {
return site.url.replace(/^http(s?):\/\//, '').replace(/\/$/, '');
}