Skip to content

Commit

Permalink
Remove redundant null check
Browse files Browse the repository at this point in the history
This check is redundant, since it should already be covered by

    else {
      return autoComplete;
    }
  • Loading branch information
sambostock committed Feb 27, 2020
1 parent 6be34a1 commit ec0b0f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@

### Code quality

- Removed redundant null check in `TextField` ([#2783](https://github.com/Shopify/polaris-react/pull/2783))

### Deprecations
4 changes: 1 addition & 3 deletions src/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,7 @@ export function TextField({
}

function normalizeAutoComplete(autoComplete?: boolean | string) {
if (autoComplete == null) {
return autoComplete;
} else if (autoComplete === true) {
if (autoComplete === true) {
return 'on';
} else if (autoComplete === false) {
return 'off';
Expand Down

0 comments on commit ec0b0f9

Please sign in to comment.