Merge pull request #207 from lbryio/mobile-publish-fix
add check before calling find
This commit is contained in:
commit
1c474adbeb
2 changed files with 2 additions and 2 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -3246,7 +3246,7 @@ const doPublish = (success, fail) => (dispatch, getState) => {
|
|||
}
|
||||
|
||||
// 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 publishPayload = {
|
||||
|
|
|
@ -275,7 +275,7 @@ export const doPublish = (success: Function, fail: Function) => (
|
|||
}
|
||||
|
||||
// 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 publishPayload: {
|
||||
|
|
Loading…
Reference in a new issue