fix: comment create without existing channel
This commit is contained in:
parent
9919a81509
commit
b11eb3262b
2 changed files with 3 additions and 2 deletions
2
dist/bundle.es.js
vendored
2
dist/bundle.es.js
vendored
|
@ -3854,7 +3854,7 @@ function doCommentCreate(comment = '', claim_id = '', channel, parent_id) {
|
|||
type: COMMENT_CREATE_STARTED
|
||||
});
|
||||
const myChannels = selectMyChannelClaims(state);
|
||||
const namedChannelClaim = myChannels.find(myChannel => myChannel.name === channel);
|
||||
const namedChannelClaim = myChannels && myChannels.find(myChannel => myChannel.name === channel);
|
||||
const channel_id = namedChannelClaim ? namedChannelClaim.claim_id : null;
|
||||
return lbryProxy.comment_create({
|
||||
comment,
|
||||
|
|
|
@ -48,7 +48,8 @@ export function doCommentCreate(
|
|||
type: ACTIONS.COMMENT_CREATE_STARTED,
|
||||
});
|
||||
const myChannels = selectMyChannelClaims(state);
|
||||
const namedChannelClaim = myChannels.find(myChannel => myChannel.name === channel);
|
||||
const namedChannelClaim =
|
||||
myChannels && myChannels.find(myChannel => myChannel.name === channel);
|
||||
const channel_id = namedChannelClaim ? namedChannelClaim.claim_id : null;
|
||||
return Lbry.comment_create({
|
||||
comment,
|
||||
|
|
Loading…
Reference in a new issue