1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

Move middle name fieldnames to Identity constants

This commit is contained in:
Daniel James Smith
2022-01-02 14:37:57 +01:00
parent 5c66dade4a
commit 729150d404
2 changed files with 10 additions and 1 deletions

View File

@@ -610,7 +610,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.firstName = f; fillFields.firstName = f;
break; break;
} else if (!fillFields.middleName && this.isFieldMatch(f[attr], } else if (!fillFields.middleName && this.isFieldMatch(f[attr],
['m-name', 'middle-name', 'additional-name', 'middle-initial', 'middle-n', 'middle-i'])) { IdentityAutoFillConstants.MiddlenameFieldNames)) {
fillFields.middleName = f; fillFields.middleName = f;
break; break;
} else if (!fillFields.lastName && this.isFieldMatch(f[attr], } else if (!fillFields.lastName && this.isFieldMatch(f[attr],

View File

@@ -200,6 +200,15 @@ export class IdentityAutoFillConstants {
"vorname", "vorname",
]; ];
static readonly MiddlenameFieldNames: string[] = [
"m-name",
"middle-name",
"additional-name",
"middle-initial",
"middle-n",
"middle-i",
];
static readonly LastnameFieldNames: string[] = [ static readonly LastnameFieldNames: string[] = [
// English // English
"l-name", "l-name",