summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r--web/react/components/create_post.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index ed6818dc8..2581bdcca 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -300,14 +300,17 @@ export default class CreatePost extends React.Component {
const channelId = ChannelStore.getCurrentId();
const lastPost = PostStore.getCurrentUsersLatestPost(channelId);
+ if (!lastPost) {
+ return;
+ }
var type = (lastPost.root_id && lastPost.root_id.length > 0) ? 'Comment' : 'Post';
AppDispatcher.handleViewAction({
type: ActionTypes.RECIEVED_EDIT_POST,
- refoucsId: '#post_textbox',
+ refocusId: '#post_textbox',
title: type,
message: lastPost.message,
- lastPostId: lastPost.id,
+ postId: lastPost.id,
channelId: lastPost.channel_id
});
}