diff --git a/UNRELEASED.md b/UNRELEASED.md index 30d0005828b..551472f09b1 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -21,4 +21,6 @@ ### Code quality +- Removed redundant null check in `TextField` ([#2783](https://github.com/Shopify/polaris-react/pull/2783)) + ### Deprecations diff --git a/src/components/TextField/TextField.tsx b/src/components/TextField/TextField.tsx index 24eb58f1453..18c2de6daad 100644 --- a/src/components/TextField/TextField.tsx +++ b/src/components/TextField/TextField.tsx @@ -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';