@@ -166,7 +166,11 @@ Navigation.loadChildNodes = function (isNode, $expandElem, callback) {
166166 }
167167
168168 $.post('index.php?route=/navigation&ajax_request=1', params, function (data) {
169- if (typeof data !== 'undefined' && data.success === true) {
169+ if (typeof data === 'undefined') {
170+ return;
171+ }
172+
173+ if (data.success === true) {
170174 $destination.find('div.list_container').remove(); // FIXME: Hack, there shouldn't be a list container there
171175 if (isNode) {
172176 $destination.append(data.message);
@@ -191,7 +195,7 @@ Navigation.loadChildNodes = function (isNode, $expandElem, callback) {
191195 if (callback && typeof callback === 'function') {
192196 callback(data);
193197 }
194- } else if (typeof data !== 'undefined' && data.redirect_flag === '1') {
198+ } else if (data.redirect_flag === '1') {
195199 if (window.location.href.indexOf('?') === -1) {
196200 window.location.href += '?session_expired=1';
197201 } else {
@@ -939,7 +943,11 @@ Navigation.reload = function (callback, paths) {
939943
940944 function requestNaviReload (params) {
941945 $.post('index.php?route=/navigation&ajax_request=1', params, function (data) {
942- if (typeof data !== 'undefined' && data.success) {
946+ if (typeof data === 'undefined') {
947+ return;
948+ }
949+
950+ if (data.success) {
943951 $('#pma_navigation_tree').html(data.message).children('div').show();
944952 if ($('#pma_navigation_tree').hasClass('synced')) {
945953 Navigation.selectCurrentDatabase();
0 commit comments