Move address1 fieldnames to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 14:43:46 +01:00
parent d25d532184
commit b2a3cd7feb
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 8 additions and 1 deletions

View File

@ -631,7 +631,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.address = f;
break;
} else if (!fillFields.address1 && this.isFieldMatch(f[attr],
['address-1', 'address-line-1', 'addr-1', 'street-1'])) {
IdentityAutoFillConstants.Address1FieldNames)) {
fillFields.address1 = f;
break;
} else if (!fillFields.address2 && this.isFieldMatch(f[attr],

View File

@ -227,6 +227,13 @@ export class IdentityAutoFillConstants {
static readonly EmailFieldNames: string[] = ["e-mail", "email-address"];
static readonly Address1FieldNames: string[] = [
"address-1",
"address-line-1",
"addr-1",
"street-1",
];
static readonly IsoCountries: { [id: string]: string } = {
afghanistan: "AF",
"aland islands": "AX",