diff --git a/ui/redux/actions/user.js b/ui/redux/actions/user.js index 4d8049db1..ac6eb82d7 100644 --- a/ui/redux/actions/user.js +++ b/ui/redux/actions/user.js @@ -647,7 +647,14 @@ export function doUserSetReferrer(referrer, shouldClaim) { if (!claim) { try { const response = await Lbry.resolve({ urls: [uri] }); - claim = response && response[uri]; + if (response && response[uri] && !response[uri].error) claim = response && response[uri]; + if (claim) { + if (claim.signing_channel) { + referrerCode = claim.signing_channel.permanent_url.replace('lbry://', ''); + } else { + referrerCode = claim.permanent_url.replace('lbry://', ''); + } + } } catch (error) { dispatch({ type: ACTIONS.USER_SET_REFERRER_FAILURE, @@ -655,13 +662,6 @@ export function doUserSetReferrer(referrer, shouldClaim) { }); } } - if (claim) { - if (claim.signing_channel) { - referrerCode = claim.signing_channel.permanent_url.replace('lbry://', ''); - } else { - referrerCode = claim.permanent_url.replace('lbry://', ''); - } - } } if (!referrerCode) {