From 5e7503673dea6b1ee64989eac51c63752d385ea3 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Fri, 14 Nov 2014 09:28:03 +0530 Subject: [PATCH] Replace only if there are actually errors Signed-off-by: Madhura Jayaratne --- js/navigation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/navigation.js b/js/navigation.js index fb28474654..914aa54158 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -538,11 +538,14 @@ function loadChildNodes($expandElem, callback) { $expandElem.addClass('loaded'); $destination.find('div.list_container').remove(); // FIXME: Hack, there shouldn't be a list container there $destination.append(data.message); - if (data._debug) { + if (data._debug){ $('#session_debug').replaceWith(data._debug); } if (data._errors) { - $('#pma_errors').replaceWith(data._errors); + $errors = $(data._errors); + if ($errors.children().length > 0) { + $('#pma_errors').replaceWith(data._errors); + } } if (callback && typeof callback == 'function') { callback(data);