Fix bugs reported by sentry (#1081)

This commit is contained in:
enahum 2017-11-02 16:09:01 -03:00 committed by GitHub
parent 0210d6e1eb
commit 1a12abfe50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View file

@ -21,13 +21,13 @@ export default class Drawer extends BaseDrawer {
}
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
Keyboard.addListener('keyboardDidShow', this.keyboardDidShow);
Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
}
componentWillUnmount() {
this.keyboardDidShowListener.remove();
this.keyboardDidHideListener.remove();
Keyboard.removeListener('keyboardDidShow', this.keyboardDidShow);
Keyboard.removeListener('keyboardDidHide', this.keyboardDidHide);
}
getMainHeight = () => '100%';

View file

@ -20,8 +20,7 @@ function mapStateToProps(state, ownProps) {
return {
theme: ownProps.theme || getTheme(state),
status,
user,
...ownProps
user
};
}

View file

@ -35,7 +35,7 @@ function mapStateToProps(state) {
const currentUserId = getCurrentUserId(state);
const favoriteChannels = getSortedFavoriteChannelIds(state);
const isCurrent = currentChannel.id === state.entities.channels.currentChannelId;
const isFavorite = favoriteChannels.indexOf(currentChannel.id) > -1;
const isFavorite = favoriteChannels && favoriteChannels.indexOf(currentChannel.id) > -1;
const roles = getCurrentUserRoles(state);
const canManageUsers = currentChannel.hasOwnProperty('id') ? canManageChannelMembers(state) : false;