From 48ff5cfb1ff572038bda2c381a5085ab30228763 Mon Sep 17 00:00:00 2001 From: ksercs Date: Sun, 8 Sep 2024 14:26:02 +0400 Subject: [PATCH] refactor _isValuableTextEntered --- .../devextreme/js/__internal/ui/chat/chat_message_box.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts b/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts index 029271ce2016..72b1de0c96c8 100644 --- a/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts +++ b/packages/devextreme/js/__internal/ui/chat/chat_message_box.ts @@ -61,8 +61,9 @@ class MessageBox extends DOMComponent { } _isValuableTextEntered(): boolean { - const text = this._textArea.option('text') ?? ''; - return !!text.trim(); + const { text } = this._textArea.option(); + + return !!text?.trim(); } _renderTextArea(): void {