1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

Move address containsOptions to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 16:16:10 +01:00
parent 30f7e29773
commit bc3de6e115
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 8 additions and 1 deletions

View File

@ -620,7 +620,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.email = f;
break;
} else if (!fillFields.address && this.isFieldMatch(f[attr],
IdentityAutoFillConstants.AddressFieldNames, ['mailing-addr', 'billing-addr', 'mail-addr', 'bill-addr'])) {
IdentityAutoFillConstants.AddressFieldNames, IdentityAutoFillConstants.AddressFieldNameValues)) {
fillFields.address = f;
break;
} else if (!fillFields.address1 && this.isFieldMatch(f[attr],

View File

@ -325,6 +325,13 @@ export class IdentityAutoFillConstants {
"bill-addr",
];
static readonly AddressFieldNameValues: string[] = [
"mailing-addr",
"billing-addr",
"mail-addr",
"bill-addr",
];
static readonly Address1FieldNames: string[] = [
"address-1",
"address-line-1",