Conform more of the codebase with strictNullChecks
(#10703)
This commit is contained in:
parent
db40479910
commit
619a9e8542
24 changed files with 108 additions and 77 deletions
|
@ -69,7 +69,7 @@ export default class CountryDropdown extends React.Component<IProps, IState> {
|
|||
const locale = new Intl.Locale(navigator.language ?? navigator.languages[0]);
|
||||
const code = locale.region ?? locale.language ?? locale.baseName;
|
||||
const displayNames = new Intl.DisplayNames(["en"], { type: "region" });
|
||||
const displayName = displayNames.of(code).toUpperCase();
|
||||
const displayName = displayNames.of(code)?.toUpperCase();
|
||||
defaultCountry = COUNTRIES.find(
|
||||
(c) => c.iso2 === code.toUpperCase() || c.name.toUpperCase() === displayName,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue