mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
Move city fieldnames to Identity constants
This commit is contained in:
@@ -647,7 +647,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
fillFields.postalCode = f;
|
fillFields.postalCode = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.city && this.isFieldMatch(f[attr],
|
} else if (!fillFields.city && this.isFieldMatch(f[attr],
|
||||||
['city', 'town', 'address-level-2', 'address-city', 'address-town'])) {
|
IdentityAutoFillConstants.CityFieldNames)) {
|
||||||
fillFields.city = f;
|
fillFields.city = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
||||||
|
|||||||
@@ -262,6 +262,14 @@ export class IdentityAutoFillConstants {
|
|||||||
"address-zip-code",
|
"address-zip-code",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CityFieldNames: string[] = [
|
||||||
|
"city",
|
||||||
|
"town",
|
||||||
|
"address-level-2",
|
||||||
|
"address-city",
|
||||||
|
"address-town",
|
||||||
|
];
|
||||||
|
|
||||||
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