X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c4a5e3c6af1aa8af29403c3b65296dd6ec64def8..701add841618f48eda933c22e9226a8a237e12a6:/src/store/open-in-new-tab/open-in-new-tab.actions.ts diff --git a/src/store/open-in-new-tab/open-in-new-tab.actions.ts b/src/store/open-in-new-tab/open-in-new-tab.actions.ts index c465aae8..6b9db6a5 100644 --- a/src/store/open-in-new-tab/open-in-new-tab.actions.ts +++ b/src/store/open-in-new-tab/open-in-new-tab.actions.ts @@ -21,7 +21,9 @@ export const copyToClipboardAction = (resource: any) => (dispatch: Dispatch, get // Copy to clipboard omits token to avoid accidental sharing const url = getNavUrl(resource.uuid, getState().auth, false); - if (url) { + if (url[0] === '/') { + copy(`${window.location.origin}${url}`); + } else if (url.length) { copy(url); } };