diff --git a/src/Add-on/Erp/HostURL.ts b/src/Add-on/Erp/HostURL.ts index e0a4c9f22..7173b000a 100644 --- a/src/Add-on/Erp/HostURL.ts +++ b/src/Add-on/Erp/HostURL.ts @@ -22,12 +22,20 @@ if (location.hash != '') { const query = new URLSearchParams(location.hash.substring(1)); let branch = query.get('cd'); - let host = ErpURL.host; if (branch) { if (branch.indexOf('//localhost') == -1) { - ErpURL.host = host + `/branch=${branch}/`; + let items = branch.split('?').map(i => i.replace(/\//g, '')); + if (items[0].length > 0) + { + ErpURL.host += `/branch=${items[0]}`; + } + if (items[1]?.length > 0) + { + ErpURL.host += '/?' + items[1]; + } + ErpURL.host += '/'; } else { ErpURL.host = branch;