Skip to content

Commit 0d9a522

Browse files
committed
fix: payment with empty password hint
1 parent 68157c0 commit 0d9a522

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/components/inputField.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ export default class InputField {
557557
this.container.append(border);
558558
}
559559

560-
if(label) {
560+
if(label != null) {
561561
this.label = document.createElement('label');
562562
this.setLabel();
563563
this.container.append(this.label);
@@ -636,6 +636,7 @@ export default class InputField {
636636
} else {
637637
this.label.append(i18n(this.options.label, this.options.labelOptions));
638638
}
639+
this.label.style.visibility = this.label.textContent ? 'visible' : 'hidden';
639640
}
640641

641642
get value(): string {
@@ -709,6 +710,7 @@ export default class InputField {
709710
if(label) {
710711
this.label.textContent = '';
711712
this.label.append(i18n(label, this.options.labelOptions));
713+
this.label.style.visibility = 'visible';
712714
} else {
713715
this.setLabel();
714716
}

‎src/components/popups/paymentCardConfirmation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class PopupPaymentCardConfirmation extends PopupElement<{
2525
});
2626

2727
const section = new SettingSection({noDelimiter: true, noShadow: true, caption: 'Checkout.PasswordEntry.Text', captionArgs: [card]});
28-
const passwordInputField = new PasswordInputField({labelText: passwordState.hint});
28+
const passwordInputField = new PasswordInputField({labelText: passwordState.hint ?? ''});
2929
section.content.append(passwordInputField.container);
3030
this.scrollable.append(section.container);
3131

0 commit comments

Comments
 (0)