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

Commit 6972278

Browse files
mrkevfacebook-github-bot
authored andcommitted
Flowify editOnBlur.js
Summary: The only change I had to make was switching a sketchy null check to not be so, by wrapping the value in `Boolean`. Reviewed By: kedromelon Differential Revision: D16595682 fbshipit-source-id: eef3f62e14dd93f8e3a3149b8fa5959b4878fbe2
1 parent 14349f1 commit 6972278

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/component/handlers/edit/editOnBlur.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* @format
8-
* @flow
8+
* @flow strict-local
99
* @emails oncall+draft_js
1010
*/
1111

@@ -30,7 +30,7 @@ function editOnBlur(editor: DraftEditor, e: SyntheticEvent<>): void {
3030
// However if users wish to override this behaviour they can provide
3131
// a prop preserveSelectionOnBlur of `true`.
3232
if (
33-
!editor.props.preserveSelectionOnBlur &&
33+
!Boolean(editor.props.preserveSelectionOnBlur) &&
3434
getActiveElement() === document.body
3535
) {
3636
const selection = global.getSelection();

0 commit comments

Comments
 (0)