forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn if checkbox changes controlledness (from boolean
checked
to null)
- Loading branch information
Marcin Mazurek
committed
Aug 26, 2016
1 parent
f784a2d
commit 5cf453f
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this just needs to use the != operator instead of the !== operator, to become return usesChecked ? props.checked !== undefined : props.value !== undefined;