diff --git a/src/core/client/stream/components/Permalink/PermalinkView.tsx b/src/core/client/stream/components/Permalink/PermalinkView.tsx index a5e6b76db..ad10de179 100644 --- a/src/core/client/stream/components/Permalink/PermalinkView.tsx +++ b/src/core/client/stream/components/Permalink/PermalinkView.tsx @@ -21,22 +21,27 @@ const PermalinkView: StatelessComponent = props => { if (props.comment) { // TODO (bc) temporary needed to pass the assetID to go back to the correct asset until the backend // returns the correct asset url - const assetURL = `${location.origin}/?assetID=${query.assetID}`; + let assetURL: string = ""; + if (query.assetID) { + assetURL = `${location.origin}/?assetID=${query.assetID}`; + } return (
- + {assetURL && ( + + )}
); diff --git a/src/core/client/stream/containers/PermalinkContainer.tsx b/src/core/client/stream/containers/PermalinkContainer.tsx index ea4630391..1176426c5 100644 --- a/src/core/client/stream/containers/PermalinkContainer.tsx +++ b/src/core/client/stream/containers/PermalinkContainer.tsx @@ -10,8 +10,13 @@ interface InnerProps { commentID: string; } -export const PermalinkContainer: StatelessComponent = props => { - return ; +export const PermalinkContainer: StatelessComponent = ({ + local, + commentID, +}) => { + return local.assetURL ? ( + + ) : null; }; const enhanced = withLocalStateContainer(