Fix hiding send as menu

This commit is contained in:
Eduard Kuzmenko 2022-04-14 02:41:37 +03:00
parent 7be8a806ab
commit a928ceb6bb

View File

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