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 myChannelUris = channels ? channels.map(channel => channel.permanent_url) : [];
|
||||||
const ownedClaim = myClaimUris.includes(uri) || myChannelUris.includes(uri);
|
const ownedClaim = myClaimUris.includes(uri) || myChannelUris.includes(uri);
|
||||||
const { claimName } = parseURI(uri);
|
const { isChannel } = parseURI(uri);
|
||||||
const isChannel = claimName && claimName[0] === '@';
|
|
||||||
|
|
||||||
let innerContent = null;
|
let innerContent = null;
|
||||||
if ((isResolvingUri && !claim) || !claim) {
|
if ((isResolvingUri && !claim) || !claim) {
|
||||||
|
|
|
@ -324,7 +324,7 @@ export function uploadImageAsset(filePath, success, failure) {
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (failure) {
|
if (failure) {
|
||||||
failure(err.message);
|
failure(err.message ? err.message : 'The image failed to upload.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue