Fix hiding send as menu

This commit is contained in:
Eduard Kuzmenko 2022-04-14 02:41:37 +03:00
parent 1f5f7b2b6a
commit 562cc330a5
1 changed files with 5 additions and 1 deletions

View File

@ -1337,8 +1337,12 @@ export default class ChatInput {
private updateBotCommandsToggle(skipAnimation?: boolean) {
const {botCommandsToggle, hasBotCommands} = this;
const show = hasBotCommands && this.isInputEmpty();
const show = !!hasBotCommands && this.isInputEmpty();
if(!hasBotCommands) {
if(!botCommandsToggle.parentElement) {
return;
}
botCommandsToggle.remove();
}