mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-04 18:37:45 +01:00
support reversed 13 length month select
This commit is contained in:
parent
3e1e05ab4f
commit
1d03103faf
@ -494,14 +494,20 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
if (fillFields.expMonth.selectInfo && fillFields.expMonth.selectInfo.options) {
|
||||
let index: number = null;
|
||||
if (fillFields.expMonth.selectInfo.options.length === 12) {
|
||||
const siOptions = fillFields.expMonth.selectInfo.options;
|
||||
if (siOptions.length === 12) {
|
||||
index = parseInt(card.expMonth, null) - 1;
|
||||
} else if (fillFields.expMonth.selectInfo.options.length === 13) {
|
||||
index = parseInt(card.expMonth, null);
|
||||
} else if (siOptions.length === 13) {
|
||||
if (siOptions[0][0] != null && siOptions[0][0] !== '' &&
|
||||
(siOptions[12][0] == null || siOptions[12][0] === '')) {
|
||||
index = parseInt(card.expMonth, null) - 1;
|
||||
} else {
|
||||
index = parseInt(card.expMonth, null);
|
||||
}
|
||||
}
|
||||
|
||||
if (index != null) {
|
||||
const option = fillFields.expMonth.selectInfo.options[index];
|
||||
const option = siOptions[index];
|
||||
if (option.length > 1) {
|
||||
expMonth = option[1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user