Fixed image upload issue

This commit is contained in:
Mustafa Buyukcelebi 2019-09-13 15:04:10 +03:00
parent 15ce2afb7c
commit 3aab385064

View File

@ -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 });