fix error on opening related content or urls
This commit is contained in:
parent
683b1f4805
commit
156e310368
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue