From c7e0cd4759aa81b30912033b8db01e799d6330b4 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Tue, 28 Jun 2022 02:44:25 +0200 Subject: [PATCH] Fix removing webpage during editing --- src/components/chat/input.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index 5f8c0b07..a1144d6c 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -169,7 +169,7 @@ export default class ChatInput { // private scrollDiff = 0; public helperType: Exclude; - private helperFunc: () => void; + private helperFunc: () => void | Promise; private helperWaitingForward: boolean; public willAttachType: 'document' | 'media'; @@ -2172,7 +2172,7 @@ export default class ChatInput { } }; - private onHelperCancel = (e?: Event, force?: boolean) => { + private onHelperCancel = async(e?: Event, force?: boolean) => { if(e) { cancelEvent(e); } @@ -2182,7 +2182,7 @@ export default class ChatInput { let needReturn = false; if(this.helperType) { //if(this.helperFunc) { - this.helperFunc(); + await this.helperFunc(); //} needReturn = true;