sforkowany z mirror/soapbox
Merge branch 'defensive-emoji-modal' into 'develop'
ReactionsModal: defensive property checks See merge request soapbox-pub/soapbox-fe!1069purgecss
commit
3192120211
|
@ -93,8 +93,8 @@ class ReactionsModal extends React.PureComponent {
|
|||
const { reaction } = this.state;
|
||||
|
||||
const accounts = reactions && (reaction
|
||||
? reactions.find(reaction => reaction.name === this.state.reaction).accounts.map(account => ({ id: account, reaction: this.state.reaction }))
|
||||
: reactions.map(reaction => reaction.accounts.map(account => ({ id: account, reaction: reaction.name }))).flatten());
|
||||
? reactions.find(reaction => reaction.name === this.state.reaction)?.accounts.map(account => ({ id: account, reaction: this.state.reaction }))
|
||||
: reactions.map(reaction => reaction?.accounts.map(account => ({ id: account, reaction: reaction.name }))).flatten());
|
||||
|
||||
let body;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue