Fixes: Image uploads not working
This commit is contained in:
@@ -124,13 +124,13 @@ type Props = {
|
||||
);
|
||||
}
|
||||
|
||||
onImageUploadStart() {
|
||||
onImageUploadStart = () => {
|
||||
this.setState({ isLoading: true });
|
||||
}
|
||||
};
|
||||
|
||||
onImageUploadStop() {
|
||||
onImageUploadStop = () => {
|
||||
this.setState({ isLoading: false });
|
||||
}
|
||||
};
|
||||
|
||||
onChange = text => {
|
||||
if (!this.document) return;
|
||||
@@ -166,7 +166,7 @@ type Props = {
|
||||
|
||||
render() {
|
||||
const isNew = this.props.newDocument;
|
||||
const isEditing = this.props.match.params.edit || isNew;
|
||||
const isEditing = !!this.props.match.params.edit || isNew;
|
||||
const isFetching = !this.document;
|
||||
const titleText = get(this.document, 'title', 'Loading');
|
||||
|
||||
@@ -190,6 +190,7 @@ type Props = {
|
||||
onDragEnter={this.onStartDragging}
|
||||
onDragLeave={this.onStopDragging}
|
||||
onDrop={this.onStopDragging}
|
||||
disabled={isEditing}
|
||||
>
|
||||
<Flex justify="center" auto>
|
||||
<Prompt
|
||||
|
||||
Reference in New Issue
Block a user