Skip to content

Commit

Permalink
Merge pull request #2783 from Shopify/remove-redundant-condition
Browse files Browse the repository at this point in the history
[TextField] Remove redundant null check
  • Loading branch information
sambostock authored Mar 13, 2020
2 parents 4a91260 + 5a0a6da commit 8dc950f
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 @@ -18,4 +18,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 8dc950f

Please sign in to comment.