Skip to content

Commit

Permalink
Small fix in checkbox logic (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyfer Mathewson authored May 10, 2019
1 parent ba0224a commit cd868a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

### Code quality

- Simplified logic in Checkbox component ([#1453](https://github.com/Shopify/polaris-react/pull/1453))

### Deprecations
2 changes: 1 addition & 1 deletion src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class Checkbox extends React.PureComponent<CombinedProps, never> {

componentDidUpdate({disabled: prevDisabled}: Props) {
if (
prevDisabled === true &&
this.props.disabled &&
!prevDisabled !== true &&
this.inputNode.current &&
this.inputNode.current.checked
) {
Expand Down

0 comments on commit cd868a1

Please sign in to comment.