1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

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) {
if (this.messageComposerInput) {
if (this.messageComposerInput && this.messageComposerInput.sentHistory) {
this.messageComposerInput.sentHistory.saveLastTextEntry();
}
}