From a98bd49e37a049676dcfc2e2bbecd8f06dc9f9cd Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Fri, 4 Mar 2022 13:57:46 +0100 Subject: [PATCH] Fix share button behaviour if there is a ?query param in the url --- src/orchestratorViewer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/orchestratorViewer.js b/src/orchestratorViewer.js index c6630b9..12516e4 100644 --- a/src/orchestratorViewer.js +++ b/src/orchestratorViewer.js @@ -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 (