mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
fix JS error when adding reaction when latest post is ephemeral (#6512)
This commit is contained in:
committed by
Harrison Healey
parent
fdf1164aee
commit
8ce72aedc3
@@ -270,11 +270,11 @@ export default class CreatePost extends React.Component {
|
||||
const action = isReaction[1];
|
||||
|
||||
const emojiName = isReaction[2];
|
||||
const postId = PostStore.getLatestPost(this.state.channelId).id;
|
||||
const postId = PostStore.getLatestNonEphemeralPost(this.state.channelId).id;
|
||||
|
||||
if (action === '+') {
|
||||
if (postId && action === '+') {
|
||||
PostActions.addReaction(this.state.channelId, postId, emojiName);
|
||||
} else if (action === '-') {
|
||||
} else if (postId && action === '-') {
|
||||
PostActions.removeReaction(this.state.channelId, postId, emojiName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user