1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

Move state fieldnames to Identity constants

This commit is contained in:
Daniel James Smith
2022-01-02 14:51:34 +01:00
parent 61dbe5421f
commit 4390989a88
2 changed files with 10 additions and 2 deletions

View File

@@ -651,8 +651,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.city = f;
break;
} else if (!fillFields.state && this.isFieldMatch(f[attr],
['state', 'province', 'provence', 'address-level-1', 'address-state',
'address-province'])) {
IdentityAutoFillConstants.StateFieldNames)) {
fillFields.state = f;
break;
} else if (!fillFields.country && this.isFieldMatch(f[attr],

View File

@@ -270,6 +270,15 @@ export class IdentityAutoFillConstants {
"address-town",
];
static readonly StateFieldNames: string[] = [
"state",
"province",
"provence",
"address-level-1",
"address-state",
"address-province",
];
static readonly IsoCountries: { [id: string]: string } = {
afghanistan: "AF",
"aland islands": "AX",