Skip to content

Commit

Permalink
feat: handle null selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed May 8, 2022
1 parent 0164bf3 commit eee81bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ export function fixProps(context: RenderContext, delta: any, append = false) {
}
}
}
if (typeof delta.selection === 'string' || Array.isArray(delta.selection)) {
if (typeof delta.selection === null || delta.selection === '') {
context.props.selection = null;
} else if (typeof delta.selection === 'string' || Array.isArray(delta.selection)) {
context.props.selection = resolveSet(
delta.selection,
context.props.sets,
Expand Down

0 comments on commit eee81bb

Please sign in to comment.