diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 430b1ae..ee5209b 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2227,9 +2227,12 @@ const makeSelectClaimForUri = (uri, returnRepost = true) => reselect.createSelec if (validUri && byUri) { const claimId = uri && byUri[normalizeURI(uri)]; const claim = byId[claimId]; - if (claim === undefined || claim === null) { - // Make sure to return the claim as is so apps can check if it's been resolved before (null) or still needs to be resolved (undefined) - return claim; + + // Make sure to return the claim as is so apps can check if it's been resolved before (null) or still needs to be resolved (undefined) + if (claimId === null) { + return null; + } else if (claimId === undefined) { + return undefined; } const repostedClaim = claim.reposted_claim; diff --git a/src/redux/selectors/claims.js b/src/redux/selectors/claims.js index b724567..eadd945 100644 --- a/src/redux/selectors/claims.js +++ b/src/redux/selectors/claims.js @@ -116,9 +116,12 @@ export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true) if (validUri && byUri) { const claimId = uri && byUri[normalizeURI(uri)]; const claim = byId[claimId]; - if (claim === undefined || claim === null) { - // Make sure to return the claim as is so apps can check if it's been resolved before (null) or still needs to be resolved (undefined) - return claim; + + // Make sure to return the claim as is so apps can check if it's been resolved before (null) or still needs to be resolved (undefined) + if (claimId === null) { + return null; + } else if (claimId === undefined) { + return undefined; } const repostedClaim = claim.reposted_claim; @@ -512,7 +515,7 @@ export const selectMyChannelClaims = createSelector( export const selectMyChannelUrls = createSelector( selectMyChannelClaims, - claims => claims ? claims.map(claim => claim.canonical_url || claim.permanent_url) : undefined + claims => (claims ? claims.map(claim => claim.canonical_url || claim.permanent_url) : undefined) ); export const selectResolvingUris = createSelector(