Fix popup not respecting <null> for text
| @@ -73,8 +73,8 @@ const showPopupHelper = { | ||
| 73 | 73 | /** |
| 74 | 74 | * Asynchronously displays an input popup with the given header and text, and returns the user's input. |
| 75 | 75 | * |
| 76 | 76 | * @param {string?} header - The header text for the popup. |
| 77 | 77 | * @param {string?} text - The main text for the popup. |
| 78 | 78 | * @param {string} [defaultValue=''] - The default value for the input field. |
| 79 | 79 | * @param {PopupOptions} [popupOptions={}] - Options for the popup. |
| 80 | 80 | * @return {Promise<string?>} A Promise that resolves with the user's input. |
| @@ -591,15 +591,15 @@ class PopupUtils { | ||
| 591 | 591 | /** |
| 592 | 592 | * Builds popup content with header and text below |
| 593 | 593 | * |
| 594 | 594 | * @param {string?} header - The header to be added to the text |
| 595 | 595 | * @param {string?} text - The main text content |
| 596 | 596 | */ |
| 597 | 597 | static BuildTextWithHeader(header, text) { |
| 598 | 598 | if (!header) { |
| 599 | 599 | return text; |
| 600 | 600 | } |
| 601 | 601 | return `<h3>${header}</h3> |
| 602 | - ${text}`; | |
| 602 | + ${text ?? ''}`; // Convert no text to empty string | |
| 603 | 603 | } |
| 604 | 604 | } |
| 605 | 605 | |