Do not create chat if there is not current reference

Closes #14427
This commit is contained in:
Cédric Krier
2025-12-18 00:44:36 +01:00
parent 42ad8ae30b
commit 8e12aa010b
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -1406,9 +1406,11 @@
if (chat.length) {
chat.remove();
} else {
this._chat = new Sao.Chat(this.screen.current_reference);
this._chat.refresh();
this.sidebar_content.append(this._chat.el);
if (this.screen.current_reference) {
this._chat = new Sao.Chat(this.screen.current_reference);
this._chat.refresh();
this.sidebar_content.append(this._chat.el);
}
}
this.update_sidebar();
},