use err.message conditionally, and isChannel from parseURI.
This commit is contained in:
parent
0fe32e1a36
commit
78f2b4f3be
2 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue