From 006832de21e2f47e7988857c55ee258fcb697956 Mon Sep 17 00:00:00 2001 From: ayan4m1 Date: Sun, 16 Sep 2018 12:13:59 -0400 Subject: [PATCH] fix mail settings save failure message construction --- resources/themes/pterodactyl/admin/settings/mail.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/themes/pterodactyl/admin/settings/mail.blade.php b/resources/themes/pterodactyl/admin/settings/mail.blade.php index b2ca70bd9..6d6a3b269 100644 --- a/resources/themes/pterodactyl/admin/settings/mail.blade.php +++ b/resources/themes/pterodactyl/admin/settings/mail.blade.php @@ -158,14 +158,16 @@ function showErrorDialog(jqXHR, verb) { console.error(jqXHR); - var errorText; + var errorText = ''; if (!jqXHR.responseJSON) { errorText = jqXHR.responseText; } else if (jqXHR.responseJSON.error) { errorText = jqXHR.responseJSON.error; } else if (jqXHR.responseJSON.errors) { $.each(jqXHR.responseJSON.errors, function (i, v) { - errorText += ', ' + v.detail; + if (v.detail) { + errorText += v.detail + ' '; + } }); }