Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Correct warning condition #2049

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function moveSelectionBackward(
const selection = editorState.getSelection();
// Should eventually make this an invariant
warning(
!selection.isCollapsed(),
selection.isCollapsed(),
'moveSelectionBackward should only be called with a collapsed SelectionState',
);
const content = editorState.getCurrentContent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function moveSelectionForward(
const selection = editorState.getSelection();
// Should eventually make this an invariant
warning(
!selection.isCollapsed(),
selection.isCollapsed(),
'moveSelectionForward should only be called with a collapsed SelectionState',
);
const key = selection.getStartKey();
Expand Down