mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Move country fieldnames to Identity constants
This commit is contained in:
@@ -655,8 +655,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
fillFields.state = f;
|
fillFields.state = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
||||||
['country', 'country-code', 'country-name', 'address-country', 'address-country-name',
|
IdentityAutoFillConstants.CountryFieldNames)) {
|
||||||
'address-country-code'])) {
|
|
||||||
fillFields.country = f;
|
fillFields.country = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.phone && this.isFieldMatch(f[attr],
|
} else if (!fillFields.phone && this.isFieldMatch(f[attr],
|
||||||
|
|||||||
@@ -279,6 +279,15 @@ export class IdentityAutoFillConstants {
|
|||||||
"address-province",
|
"address-province",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CountryFieldNames: string[] = [
|
||||||
|
"country",
|
||||||
|
"country-code",
|
||||||
|
"country-name",
|
||||||
|
"address-country",
|
||||||
|
"address-country-name",
|
||||||
|
"address-country-code",
|
||||||
|
];
|
||||||
|
|
||||||
static readonly IsoCountries: { [id: string]: string } = {
|
static readonly IsoCountries: { [id: string]: string } = {
|
||||||
afghanistan: "AF",
|
afghanistan: "AF",
|
||||||
"aland islands": "AX",
|
"aland islands": "AX",
|
||||||
|
|||||||
Reference in New Issue
Block a user