diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index be444a26a..a94719ac0 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -45,11 +45,16 @@ export function doResolveUris(uris) { let resolveInfo = {}; lbry.resolve({ uris: urisToResolve }).then(result => { for (let [uri, uriResolveInfo] of Object.entries(result)) { - const { claim, certificate, claims_in_channel } = uriResolveInfo || { - claim: undefined, - claims_in_channel: undefined, - certificate: undefined, + const fallbackResolveInfo = { + claim: null, + claims_in_channel: null, + certificate: null, }; + + const { claim, certificate, claims_in_channel } = uriResolveInfo && + !uriResolveInfo.error + ? uriResolveInfo + : fallbackResolveInfo; resolveInfo[uri] = { claim, certificate, claims_in_channel }; } diff --git a/ui/js/page/show/view.jsx b/ui/js/page/show/view.jsx index 3dd48a705..8b1e05789 100644 --- a/ui/js/page/show/view.jsx +++ b/ui/js/page/show/view.jsx @@ -6,15 +6,17 @@ import FilePage from "page/file"; class ShowPage extends React.PureComponent { componentWillMount() { - const { resolveUri, uri } = this.props; + const { isResolvingUri, resolveUri, uri } = this.props; - resolveUri(uri); + if (!isResolvingUri) resolveUri(uri); } componentWillReceiveProps(nextProps) { - const { resolveUri, uri } = nextProps; + const { isResolvingUri, resolveUri, claim, uri } = nextProps; - resolveUri(uri); + if (!isResolvingUri && claim === undefined && uri) { + resolveUri(uri); + } } render() {