From ae685bb16625f155650a703d6ee0250ae5455c13 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Sat, 27 Mar 2021 21:35:12 +0100 Subject: [PATCH] allowEmpty config option --- src/editor/Editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 285a13e..840b6a6 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -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