use err.message conditionally, and isChannel from parseURI.

This commit is contained in:
Akinwale Ariwodola 2019-09-13 08:14:24 +01:00
parent 0fe32e1a36
commit 78f2b4f3be
2 changed files with 2 additions and 3 deletions

View file

@ -589,8 +589,7 @@ class FilePage extends React.PureComponent {
const myChannelUris = channels ? channels.map(channel => channel.permanent_url) : [];
const ownedClaim = myClaimUris.includes(uri) || myChannelUris.includes(uri);
const { claimName } = parseURI(uri);
const isChannel = claimName && claimName[0] === '@';
const { isChannel } = parseURI(uri);
let innerContent = null;
if ((isResolvingUri && !claim) || !claim) {

View file

@ -324,7 +324,7 @@ export function uploadImageAsset(filePath, success, failure) {
})
.catch(err => {
if (failure) {
failure(err.message);
failure(err.message ? err.message : 'The image failed to upload.');
}
});
}