From 42ba4c2be73ade305eb78c2726069b406ae193b1 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Thu, 29 Aug 2024 02:21:14 +0400 Subject: [PATCH] Removing unnecessary nullish operator --- assets/js/markdowntoolbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/markdowntoolbar.ts b/assets/js/markdowntoolbar.ts index f8d23008..f9ceb840 100644 --- a/assets/js/markdowntoolbar.ts +++ b/assets/js/markdowntoolbar.ts @@ -271,7 +271,7 @@ function escapeSelection(textarea: HTMLTextAreaElement, options: Partial('.communication__toolbar__button'); + const button = event.target.closest('.communication__toolbar__button'); const toolbar = button?.closest('.communication__toolbar'); if (!button || !toolbar?.parentElement) return;