Merge pull request #2034 from keepassxreboot/fix/adjust_segmented_totp_fields_check

Adjust segmented TOTP fields check
This commit is contained in:
Sami Vänttinen 2023-11-23 17:56:27 +02:00 committed by GitHub
commit 4f5f6a6bb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,7 +301,9 @@ kpxcFields.getElementFromXPathId = function(xpath) {
kpxcFields.handleSegmentedTOTPFields = function(inputs, combinations) {
// Check for multiple segmented TOTP fields when there are no inputs, or combination contains the segemented fields
const segmentedFields = combinations.filter(c => c.totp);
if (combinations.length === 0 || segmentedFields.length === DEFAULT_SEGMENTED_TOTP_FIELDS) {
if (combinations.length === 0
|| segmentedFields.length === DEFAULT_SEGMENTED_TOTP_FIELDS
|| inputs?.length === DEFAULT_SEGMENTED_TOTP_FIELDS) {
kpxcFields.getSegmentedTOTPFields(inputs, combinations);
}