Move address2 fieldnames to Identity constants

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

View File

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

View File

@ -234,6 +234,13 @@ export class IdentityAutoFillConstants {
"street-1",
];
static readonly Address2FieldNames: string[] = [
"address-2",
"address-line-2",
"addr-2",
"street-2",
];
static readonly IsoCountries: { [id: string]: string } = {
afghanistan: "AF",
"aland islands": "AX",