check if 'claims' exists before looping over it
This commit is contained in:
parent
77b27fea99
commit
15737f9b09
2 changed files with 6 additions and 6 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -2518,7 +2518,7 @@ const makeSelectChannelPermUrlForClaimUri = (uri, includePrefix = false) => rese
|
|||
});
|
||||
|
||||
const makeSelectMyChannelPermUrlForName = name => reselect.createSelector(selectMyChannelClaims, claims => {
|
||||
const matchingClaim = claims.find(claim => claim.name === name);
|
||||
const matchingClaim = claims && claims.find(claim => claim.name === name);
|
||||
return matchingClaim ? matchingClaim.permanent_url : null;
|
||||
});
|
||||
|
||||
|
|
|
@ -667,7 +667,7 @@ export const makeSelectMyChannelPermUrlForName = (name: string) =>
|
|||
createSelector(
|
||||
selectMyChannelClaims,
|
||||
claims => {
|
||||
const matchingClaim = claims.find(claim => claim.name === name);
|
||||
const matchingClaim = claims && claims.find(claim => claim.name === name);
|
||||
return matchingClaim ? matchingClaim.permanent_url : null;
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue