mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Prevent exception on page unload
Null check when saving sent history
This commit is contained in:
parent
4cc8b5621d
commit
1e80edb43c
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue