Skip to content

Commit e2b667a

Browse files
Engu-sCocoChart
authored andcommitted
FIX: Document with no content should be editable (fixes #357).
Co-authored-by: Corentin Chartier <corentinchartier334@gmail.com>
1 parent f51b924 commit e2b667a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

frontend/src/components/EditableText.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ function EditableText({id, text, rubric, isPartOf, links, beingEditedBy, fragmen
108108
let text = (rubric && !rawEditMode)
109109
? editedDocument.text.replace(PASSAGE, `{${rubric}} ${parsedText}`)
110110
: editedText;
111+
text = text === ''
112+
? '…'
113+
: text;
111114
backend.putDocument({ ...editedDocument, text })
112115
.then(x => setLastUpdate(x.rev))
113116
.then(() => setHighlightedText())

0 commit comments

Comments
 (0)