Prevent exception on page unload

Null check when saving sent history
This commit is contained in:
David Baker 2017-07-13 11:30:25 +01:00
parent 4cc8b5621d
commit 1e80edb43c

View file

@ -74,7 +74,7 @@ export default class MessageComposer extends React.Component {
} }
onPageUnload(event) { onPageUnload(event) {
if (this.messageComposerInput) { if (this.messageComposerInput && this.messageComposerInput.sentHistory) {
this.messageComposerInput.sentHistory.saveLastTextEntry(); this.messageComposerInput.sentHistory.saveLastTextEntry();
} }
} }