1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-02 22:28:46 +01:00

Fix parameter name, remove trailing spaces. (#1101)

This commit is contained in:
AlbertHilb 2017-09-09 21:45:15 +02:00 committed by Ian Storm Taylor
parent 25d54e30b0
commit 17adfd2f34

View File

@ -170,8 +170,8 @@ class Content extends React.Component {
// Otherwise, figure out which DOM nodes should be selected...
const { anchorKey, anchorOffset, focusKey, focusOffset, isCollapsed } = selection
const anchor = getCaretPosition(anchorKey, anchorOffset, state, editor, this.element)
const focus = isCollapsed
? anchor
const focus = isCollapsed
? anchor
: getCaretPosition(focusKey, focusOffset, state, editor, this.element)
// If they are already selected, do nothing.
@ -206,7 +206,7 @@ class Content extends React.Component {
/**
* The React ref method to set the root content element locally.
*
* @param {Element} n
* @param {Element} element
*/
ref = (element) => {