hasOwnProperty continue
This commit is contained in:
parent
79c2fdac48
commit
c6274dd1dc
|
@ -407,7 +407,10 @@ export default class AutofillService {
|
|||
|
||||
for (const f of pageDetails.fields) {
|
||||
for (const attr of CardAttributes) {
|
||||
if (f.hasOwnProperty(attr) && f[attr]) {
|
||||
if (!f.hasOwnProperty(attr) || !f[attr]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
|
||||
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
|
||||
if (!fillFields.cardholderName && this.isFieldMatch(f[attr],
|
||||
|
@ -443,7 +446,6 @@ export default class AutofillService {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const card = options.cipher.card;
|
||||
this.makeScriptAction(fillScript, card, fillFields, filledFields, 'cardholderName');
|
||||
|
@ -479,7 +481,10 @@ export default class AutofillService {
|
|||
|
||||
for (const f of pageDetails.fields) {
|
||||
for (const attr of IdentityAttributes) {
|
||||
if (f.hasOwnProperty(attr) && f[attr]) {
|
||||
if (!f.hasOwnProperty(attr) || !f[attr]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
|
||||
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
|
||||
if (!fillFields.name && this.isFieldMatch(f[attr],
|
||||
|
@ -539,7 +544,6 @@ export default class AutofillService {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const identity = options.cipher.identity;
|
||||
this.makeScriptAction(fillScript, identity, fillFields, filledFields, 'title');
|
||||
|
|
Loading…
Reference in New Issue