From 859fcad6a66ed7ec5fbc929f9cf3fa15cdce736f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 18 Feb 2022 08:23:57 -0800 Subject: [PATCH] Fix compilation error --- .../src/components/MultilineTextEditor.ts | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/mindplot/src/components/MultilineTextEditor.ts b/packages/mindplot/src/components/MultilineTextEditor.ts index 0d1cc839..926a107f 100644 --- a/packages/mindplot/src/components/MultilineTextEditor.ts +++ b/packages/mindplot/src/components/MultilineTextEditor.ts @@ -253,18 +253,20 @@ class MultilineTextEditor extends Events { } close(update: boolean): void { - if (this.isVisible() && this._topic) { - const actionDispatcher = ActionDispatcher.getInstance(); - this._updateModel(); - } - // Let make the visible text in the node ... - this._topic.getTextShape().setVisibility(true); + if (this.isVisible()) { + if (update) { + this._updateModel(); + } - // Remove it form the screen ... - this._containerElem.remove(); - this._containerElem = null; - this._topic = null; + // Remove it form the screen ... + this._containerElem.remove(); + this._containerElem = null; + } + + if (this._topic) { + this._topic.getTextShape().setVisibility(true); + this._topic = null; + } } } -} export default MultilineTextEditor;