Commit 156e3103 authored by Akinwale Ariwodola's avatar Akinwale Ariwodola
Browse files

fix error on opening related content or urls

parent 683b1f48
......@@ -677,13 +677,16 @@ class FilePage extends React.PureComponent {
getPurchaseUrl = () => {
const { claim, navigation } = this.props;
const { permanent_url: permanentUrl } = claim;
const permanentUrl = claim ? claim.permanent_url : null;
let purchaseUrl;
if (navigation.state.params) {
const { uri, fullUri } = navigation.state.params;
purchaseUrl = fullUri || uri || permanentUrl;
}
if (!purchaseUrl && permanentUrl) {
purchaseUrl = permanentUrl;
}
return purchaseUrl;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment