projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
19567: fix missing url origin in copy-to-clipboard for local resources
[arvados-workbench2.git]
/
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 c465aae8695a51291918aa0fd630e57fe8b327c6..6b9db6a538e1322004f14138b4e45b0bd8b53a73 100644
(file)
--- 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);
}
};