Minor behavior fix
This commit is contained in:
parent
b5517e54d1
commit
47cf61997e
|
@ -82,11 +82,17 @@ export default class RelationEditor extends Component {
|
||||||
|
|
||||||
const updatedRelation = { ...this.props.relation, annotation: updatedAnnotation };
|
const updatedRelation = { ...this.props.relation, annotation: updatedAnnotation };
|
||||||
|
|
||||||
// Fire create or update event
|
|
||||||
if (this.props.relation.annotation.bodies.length === 0)
|
if (this.state.content) {
|
||||||
this.props.onRelationCreated(updatedRelation, this.props.relation);
|
// Fire create or update event
|
||||||
else
|
if (this.props.relation.annotation.bodies.length === 0)
|
||||||
this.props.onRelationUpdated(updatedRelation, this.props.relation);
|
this.props.onRelationCreated(updatedRelation, this.props.relation);
|
||||||
|
else
|
||||||
|
this.props.onRelationUpdated(updatedRelation, this.props.relation);
|
||||||
|
} else {
|
||||||
|
// Leaving the tag empty and hitting Enter equals cancel
|
||||||
|
this.props.onCancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete = () =>
|
onDelete = () =>
|
||||||
|
|
Loading…
Reference in New Issue