diff --git a/src/component/handlers/edit/commands/moveSelectionBackward.js b/src/component/handlers/edit/commands/moveSelectionBackward.js index 10f1b89f51..1f2bc0f66a 100644 --- a/src/component/handlers/edit/commands/moveSelectionBackward.js +++ b/src/component/handlers/edit/commands/moveSelectionBackward.js @@ -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(); diff --git a/src/component/handlers/edit/commands/moveSelectionForward.js b/src/component/handlers/edit/commands/moveSelectionForward.js index 2903ba364b..8bf6d6e826 100644 --- a/src/component/handlers/edit/commands/moveSelectionForward.js +++ b/src/component/handlers/edit/commands/moveSelectionForward.js @@ -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();