Skip to content

Commit 006832d

Browse files
committed
fix mail settings save failure message construction
1 parent c8ac013 commit 006832d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

resources/themes/pterodactyl/admin/settings/mail.blade.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,16 @@ function saveAndTestSettings() {
158158
159159
function showErrorDialog(jqXHR, verb) {
160160
console.error(jqXHR);
161-
var errorText;
161+
var errorText = '';
162162
if (!jqXHR.responseJSON) {
163163
errorText = jqXHR.responseText;
164164
} else if (jqXHR.responseJSON.error) {
165165
errorText = jqXHR.responseJSON.error;
166166
} else if (jqXHR.responseJSON.errors) {
167167
$.each(jqXHR.responseJSON.errors, function (i, v) {
168-
errorText += ', ' + v.detail;
168+
if (v.detail) {
169+
errorText += v.detail + ' ';
170+
}
169171
});
170172
}
171173

0 commit comments

Comments
 (0)