Removing unnecessary nullish operator

This commit is contained in:
KoloMl 2024-08-29 02:21:14 +04:00
parent aa186fa0ad
commit 42ba4c2be7

View file

@ -271,7 +271,7 @@ function escapeSelection(textarea: HTMLTextAreaElement, options: Partial<SyntaxH
function clickHandler(event: MouseEvent) { function clickHandler(event: MouseEvent) {
if (!(event.target instanceof HTMLElement)) return; if (!(event.target instanceof HTMLElement)) return;
const button = event.target?.closest<HTMLElement>('.communication__toolbar__button'); const button = event.target.closest<HTMLElement>('.communication__toolbar__button');
const toolbar = button?.closest<HTMLElement>('.communication__toolbar'); const toolbar = button?.closest<HTMLElement>('.communication__toolbar');
if (!button || !toolbar?.parentElement) return; if (!button || !toolbar?.parentElement) return;