From fae9c9e566d0752cc9b3b3562663c838389d3355 Mon Sep 17 00:00:00 2001 From: Luca Orlandini Date: Wed, 28 Jul 2021 14:53:31 +0200 Subject: [PATCH] use href instead of url composition (#342) --- .../client/js/components/DetailsPanel/DetailsPanel.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx index 7dc7540dcd..4ee433fbea 100644 --- a/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx +++ b/geonode_mapstore_client/client/js/components/DetailsPanel/DetailsPanel.jsx @@ -23,7 +23,6 @@ import { } from '@js/utils/GNSearchUtils'; import debounce from 'lodash/debounce'; import CopyToClipboardCmp from 'react-copy-to-clipboard'; -import url from 'url'; import { TextEditable, ThumbnailEditable } from '@js/components/ContentsEditable/'; const CopyToClipboard = tooltip(CopyToClipboardCmp); @@ -55,9 +54,7 @@ function formatResourceLinkUrl(resourceUrl = '') { if (resourceUrl.indexOf('http') === 0) { return resourceUrl; } - const { path } = url.parse(resourceUrl); - const { protocol, host } = window.location; - return `${protocol}://${host}${path}`; + return window.location.href; } function ThumbnailPreview({ @@ -281,7 +278,6 @@ function DetailsPanel({ } ]; - return (