Skip to content

Commit

Permalink
Use preferred entry for auto-fill/submit even if not best match
Browse files Browse the repository at this point in the history
Fixes #277
  • Loading branch information
luckyrat committed Oct 20, 2020
1 parent e3c4930 commit 64364f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions page/formFilling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,12 @@ export class FormFilling {
) {
this.Logger.debug("No entries for form.");
} else if (matchingLogin == null) {
this.Logger.debug("Multiple entries for form, so estimating most relevant.");
matchingLogin = orderedEntriesWithPreference[0];
this.Logger.debug(
"Multiple entries for form, so using preferred or most relevant."
);
matchingLogin =
orderedEntriesWithPreference.find(e => e.isPreferredMatch) ||
orderedEntriesWithPreference[0];
multipleMatches = true;
checkMatchingLoginRelevanceThreshold = true;
}
Expand Down

0 comments on commit 64364f8

Please sign in to comment.