Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/model/immutable/EditorState.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class EditorState {
contentState: ContentState,
decorator?: ?DraftDecoratorType,
): EditorState {
if (contentState.getBlockMap().count() === 0)
return EditorState.createEmpty(decorator);
const firstKey = contentState
.getBlockMap()
.first()
Expand Down