Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmr committed Sep 21, 2023
1 parent 8c83ee5 commit bcc4085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slate-react/src/plugin/react-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export const ReactEditor: ReactEditorInterface = {
IS_FOCUSED.set(editor, true)

if (root.activeElement !== el) {
if (root instanceof Document) {
if (editor.selection && root instanceof Document) {
const domSelection = root.getSelection()
const domRange = ReactEditor.toDOMRange(editor, editor.selection)
domSelection?.removeAllRanges()
Expand Down

0 comments on commit bcc4085

Please sign in to comment.