Fix share button behaviour if there is a ?query param in the url

This commit is contained in:
Marco van Dijk 2022-03-04 13:57:46 +01:00
parent 686b19c7c4
commit a98bd49e37

View File

@ -63,7 +63,11 @@ const Orchestrator = (obj) => {
if (obj.rootOnly){
shareUrl = window.location.href;
}else{
shareUrl = window.location.href + "?orchAddr=" + thisID;
let thisFullPath = window.location.href;
if (thisFullPath.lastIndexOf("?") > -1){
thisFullPath = thisFullPath.substring(0, thisFullPath.lastIndexOf("?"));
}
shareUrl = thisFullPath + "?orchAddr=" + thisID;
}
return (