Cherry pick fixes for Sentry issues (#1567)

* Fixed MATTERMOST-MOBILE-ANDROID-85 (#1565)

* Fixed MATTERMOST-MOBILE-ANDROID-87 (#1566)
This commit is contained in:
Harrison Healey 2018-04-02 16:23:48 -04:00 committed by Elias Nahum
parent 164a5e863c
commit 1fd94c5ae0
2 changed files with 2 additions and 2 deletions

View file

@ -361,7 +361,7 @@ export default class Markdown extends PureComponent {
if (this.props.isEdited) {
const editIndicatorNode = new Node('edited_indicator');
if (['heading', 'paragraph'].includes(ast.lastChild.type)) {
if (ast.lastChild && ['heading', 'paragraph'].includes(ast.lastChild.type)) {
ast.lastChild.appendChild(editIndicatorNode);
} else {
const node = new Node('paragraph');

View file

@ -13,7 +13,7 @@ import {ViewTypes} from 'app/constants';
function displayName(state = '', action) {
switch (action.type) {
case ViewTypes.SET_CHANNEL_DISPLAY_NAME:
return action.displayName;
return action.displayName || '';
default:
return state;
}