From f8f337bba5212c512fe52e800a35e894d17e9d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 17 Dec 2025 23:35:27 +0100 Subject: [PATCH] Do not render details button on error message without details Closes #14426 --- sao/src/common.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sao/src/common.js b/sao/src/common.js index 78886531e5..00af62576b 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -3639,21 +3639,22 @@ 'white-space': 'pre-wrap', 'word-break': 'break-all', })); - alert_.append(jQuery('

').append(jQuery('', { - 'class': 'btn btn-default', - role: 'button', - 'data-toggle': 'collapse', - 'data-target': '#error-detail', - 'aria-expanded': false, - 'aria-controls': '#error-detail', - }).text(Sao.i18n.gettext("Details")))); if (details) { - alert_.append(jQuery('

', { - 'class': 'collapse', - id: 'error-detail', - }).append(jQuery('

', {
-                    'class': 'pre-scrollable',
-                }).text(details)));
+                alert_.append(
+                    jQuery('

').append(jQuery('', { + 'class': 'btn btn-default', + role: 'button', + 'data-toggle': 'collapse', + 'data-target': '#error-detail', + 'aria-expanded': false, + 'aria-controls': '#error-detail', + }).text(Sao.i18n.gettext("Details")))) + .append(jQuery('

', { + 'class': 'collapse', + id: 'error-detail', + }).append(jQuery('

', {
+                        'class': 'pre-scrollable',
+                    }).text(details)));
             }
             jQuery('', {
                 'class': 'btn btn-link',