From 3aab385064f6899a27b1b8d4c139fddf4730cefb Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Fri, 13 Sep 2019 15:04:10 +0300 Subject: [PATCH] Fixed image upload issue --- .../markdownEditor/view/markdownEditorView.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/markdownEditor/view/markdownEditorView.js b/src/components/markdownEditor/view/markdownEditorView.js index 7bd5d4b39..c644b78a3 100644 --- a/src/components/markdownEditor/view/markdownEditorView.js +++ b/src/components/markdownEditor/view/markdownEditorView.js @@ -63,9 +63,9 @@ export default class MarkdownEditorView extends Component { componentDidUpdate(prevProps, prevState) { const { text } = this.state; - const { isFormValid, handleIsFormValid } = this.props; + const { handleIsFormValid } = this.props; - if (prevState.text !== text && !isFormValid) { + if (prevState.text !== text) { const nextText = text.replace(prevState.text, ''); if (nextText && nextText.length > 0) { @@ -81,14 +81,6 @@ export default class MarkdownEditorView extends Component { // Component functions _changeText = input => { const { onChange, handleOnTextChange, handleIsValid, componentID } = this.props; - const { textUpdated } = this.state; - - if (textUpdated) { - this.setState({ - textUpdated: false, - }); - return; - } this.setState({ text: input });