Fix errors.

This commit is contained in:
John Livingston 2022-01-04 17:49:41 +01:00
parent 04b1945239
commit 563e42c640
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 10 additions and 4 deletions

View File

@ -2,10 +2,14 @@
## ???
## Features
### Features
* Builtin Prosody, Share chat url: ability to show/hide the scrollbar in readonly mode.
### Fixes
* ConverseJS plugin livechatWindowTitlePlugin: Avoid errors when model is not initialized.
## 5.2.4
### Fixes

View File

@ -220,9 +220,11 @@ window.initConverse = async function initConverse ({
requestUpdate: function (this: any): any {
console.log('[livechatWindowTitlePlugin] updating the document title.')
try {
const title = this.model.getDisplayName()
if (document.title !== title) {
document.title = title
if (this.model?.getDisplayName) {
const title = this.model.getDisplayName()
if (document.title !== title) {
document.title = title
}
}
} catch (err) {
console.error('[livechatWindowTitlePlugin] Failed updating the window title', err)