Fix errors when rendering system messages

This commit is contained in:
Samuel Elliott 2018-08-01 20:28:35 +01:00
parent 0c8279311e
commit 3a7ac06ce3
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ export default new class EmoteModule {
try { try {
// First child has all the actual text content, second is the edited timestamp // First child has all the actual text content, second is the edited timestamp
const markup = retVal.props.children[1].props; const markup = retVal.props.children[1].props;
if (!markup || !this.enabledSetting.value) return; if (!markup || !markup.children || !this.enabledSetting.value) return;
markup.children[1] = this.processMarkup(markup.children[1], component.props.message.editedTimestamp || component.props.message.timestamp); markup.children[1] = this.processMarkup(markup.children[1], component.props.message.editedTimestamp || component.props.message.timestamp);
} catch (err) { } catch (err) {
Logger.err('EmoteModule', err); Logger.err('EmoteModule', err);