From bc89e83869a5a668d3434b700bbbbd287c481113 Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Sat, 25 Jan 2020 00:56:38 +0100 Subject: [PATCH] Fix broken remove logic Got broken in commit: b93ae50 Signed-off-by: Tobias Speicher --- js/makegrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/makegrid.js b/js/makegrid.js index d7da580e5c..6fef8d2c3d 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -1378,7 +1378,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid var tools = $resultQuery.find('.tools').wrap('

').parent().html(); // sqlOuter and tools will not be present if 'Show SQL queries' configuration is off if (typeof sqlOuter !== 'undefined' && typeof tools !== 'undefined') { - $(g.o).find('.result_query').not().last().remove(); + $(g.o).find('.result_query').not($(g.o).find('.result_query').last()).remove(); var $existingQuery = $(g.o).find('.result_query'); // If two query box exists update query in second else add a second box if ($existingQuery.find('div.sqlOuter').length > 1) {