Fix crash when deleting a post (#2345)
This commit is contained in:
parent
f85344f8a5
commit
8e97b47425
2 changed files with 2 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ import {bindActionCreators} from 'redux';
|
|||
import {connect} from 'react-redux';
|
||||
|
||||
import {startPeriodicStatusUpdates, stopPeriodicStatusUpdates, logout} from 'mattermost-redux/actions/users';
|
||||
import {init as initWebSocket, close as closeWebSocket} from 'mattermost-redux/actions/websocket';
|
||||
import {RequestStatus} from 'mattermost-redux/constants';
|
||||
import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
|
||||
|
|
@ -46,8 +45,6 @@ function mapDispatchToProps(dispatch) {
|
|||
logout,
|
||||
selectDefaultTeam,
|
||||
selectInitialChannel,
|
||||
initWebSocket,
|
||||
closeWebSocket,
|
||||
recordLoadTime,
|
||||
startPeriodicStatusUpdates,
|
||||
stopPeriodicStatusUpdates,
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import {getDimensions} from 'app/selectors/device';
|
|||
import PostOptions from './post_options';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const post = getPost(state, ownProps.postId);
|
||||
const channel = getChannel(state, post.channel_id);
|
||||
const post = getPost(state, ownProps.postId) || {};
|
||||
const channel = getChannel(state, post.channel_id) || {};
|
||||
const config = getConfig(state);
|
||||
const license = getLicense(state);
|
||||
const currentUserId = getCurrentUserId(state);
|
||||
|
|
|
|||
Loading…
Reference in a new issue