fix: app breaking with old 'stream' value

This commit is contained in:
Sean Yesmunt 2019-04-30 11:02:04 -04:00
parent cfc584beaa
commit 92e0c9691f
2 changed files with 5 additions and 9 deletions

View file

@ -73,15 +73,11 @@ class FileList extends React.PureComponent<Props> {
[SORT_OPTIONS.TITLE]: fileInfos =>
fileInfos.slice().sort((fileInfo1, fileInfo2) => {
const getFileTitle = fileInfo => {
const { value, metadata, name, claim_name: claimName } = fileInfo;
if (metadata) {
// downloaded claim
return metadata.title || claimName;
} else if (value) {
// published claim
const { title } = value.stream;
return title || name;
const { value, name, claim_name: claimName } = fileInfo;
if (value) {
return value.title || claimName;
}
// Invalid claim
return '';
};

View file

@ -311,7 +311,7 @@ export const doCheckPendingPublishes = () => (dispatch: Dispatch, getState: GetS
// If it's confirmed, check if we should notify the user
if (selectosNotificationsEnabled(getState())) {
const notif = new window.Notification('LBRY Publish Complete', {
body: `${claim.value.stream.title} has been published to lbry://${
body: `${claim.value.title} has been published to lbry://${
claim.name
}. Click here to view it`,
silent: false,