Skip to content

Commit 89cf89f

Browse files
committed
fix optional buttonText
1 parent 9674764 commit 89cf89f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/ts/elements/simple-modal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class SimpleModal {
5353
inputs: FormInput[];
5454
text?: string;
5555
textAllowHtml: boolean;
56-
buttonText: string;
56+
buttonText?: string;
5757
execFn: (thisPopup: SimpleModal, ...params: string[]) => Promise<ExecReturn>;
5858
beforeInitFn: ((thisPopup: SimpleModal) => void) | undefined;
5959
beforeShowFn: ((thisPopup: SimpleModal) => void) | undefined;
@@ -101,7 +101,7 @@ export class SimpleModal {
101101

102102
this.initInputs();
103103

104-
if (this.buttonText === "") {
104+
if (this.buttonText === "" || this.buttonText === undefined) {
105105
this.element.qs(".submitButton")?.remove();
106106
} else {
107107
this.element.qs(".submitButton")?.setText(this.buttonText);

0 commit comments

Comments
 (0)