Merge pull request #207 from lbryio/mobile-publish-fix

add check before calling find
This commit is contained in:
Sean Yesmunt 2019-09-26 23:26:06 -04:00 committed by GitHub
commit 1c474adbeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

@ -3246,7 +3246,7 @@ const doPublish = (success, fail) => (dispatch, getState) => {
} }
// get the claim id from the channel name, we will use that instead // get the claim id from the channel name, we will use that instead
const namedChannelClaim = myChannels.find(myChannel => myChannel.name === channel); const namedChannelClaim = myChannels ? myChannels.find(myChannel => myChannel.name === channel) : null;
const channelId = namedChannelClaim ? namedChannelClaim.claim_id : ''; const channelId = namedChannelClaim ? namedChannelClaim.claim_id : '';
const publishPayload = { const publishPayload = {

View file

@ -275,7 +275,7 @@ export const doPublish = (success: Function, fail: Function) => (
} }
// get the claim id from the channel name, we will use that instead // get the claim id from the channel name, we will use that instead
const namedChannelClaim = myChannels.find(myChannel => myChannel.name === channel); const namedChannelClaim = myChannels ? myChannels.find(myChannel => myChannel.name === channel) : null;
const channelId = namedChannelClaim ? namedChannelClaim.claim_id : ''; const channelId = namedChannelClaim ? namedChannelClaim.claim_id : '';
const publishPayload: { const publishPayload: {