Skip to content

Commit

Permalink
Replace ?? operator with manual !== undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Mar 28, 2020
1 parent b367f77 commit b43f0d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/material-ui/src/FormControl/FormControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const FormControl = React.forwardRef(function FormControl(props, ref) {
});

const [_focused, setFocused] = React.useState(false);
const focused = visuallyFocused ?? _focused;
const focused = visuallyFocused !== undefined ? visuallyFocused : _focused;

if (disabled && focused) {
setFocused(false);
Expand Down

0 comments on commit b43f0d5

Please sign in to comment.