allowEmpty config option

This commit is contained in:
Rainer Simon 2021-03-27 21:35:12 +01:00
parent 9978d84a23
commit ae685bb166
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ const Editor = props => {
// Current annotation is either a selection (if it was created from
// scratch just now) or an annotation (if it existed already and was
// opened for editing)
if (currentAnnotation.bodies.length === 0) {
if (currentAnnotation.bodies.length === 0 && !props.config.allowEmpty) {
if (currentAnnotation.isSelection)
onCancel();
else