From fe8fc569bf775c2203cbcfe442100d76ba093465 Mon Sep 17 00:00:00 2001 From: Maitrii1 <123619067+Maitrii1@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:01:51 +0530 Subject: [PATCH] Update selectors.js minor changes --- webapp/src/selectors.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/webapp/src/selectors.js b/webapp/src/selectors.js index 8755de99..c466286d 100644 --- a/webapp/src/selectors.js +++ b/webapp/src/selectors.js @@ -1,6 +1,5 @@ -import {getConfig} from 'mattermost-redux/selectors/entities/general'; - -import {id as pluginId} from './manifest'; +import { getConfig } from 'mattermost-redux/selectors/entities/general'; +import { id as pluginId } from './manifest'; const getPluginState = (state) => state['plugins-' + pluginId] || {}; @@ -14,14 +13,14 @@ export const getEditingTodo = (state) => getPluginState(state).editingTodo; export const getTodoToast = (state) => getPluginState(state).todoToast; export const getShowRHSAction = (state) => getPluginState(state).rhsPluginAction; export const getMessage = (state) => { - const postID = getPluginState(state).postID; - if (!postID) { - return ''; - } - const post = state.entities.posts.posts[postID]; - if (!post) { - return ''; - } + const postID = getPluginState(state).postID; +if (!postID) { + return ''; +} +const post = state.entities.posts.posts[postID]; +if (!post) { + return ''; +} return post.message; }; export const getIssues = (state) => getPluginState(state).issues;