diff --git a/src/page/file/view.js b/src/page/file/view.js index 236b452..28e623d 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -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) { diff --git a/src/utils/helper.js b/src/utils/helper.js index c2c9597..1f9e76d 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -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.'); } }); }