Skip to content

Commit 2a66496

Browse files
committed
fix: Format query not working inside view modal
Query formatting didn't work inside Create view modal, when table has 0 rows. Signed-off-by: cbasguti <sebastian.gutierrezj@udea.edu.co>
1 parent 98e0676 commit 2a66496

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

libraries/classes/Sql.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,9 @@ private function getQueryResponseForNoResultsReturned(
995995

996996
$response = ResponseRenderer::getInstance();
997997
$response->addJSON($extraData ?? []);
998+
$header = $response->getHeader();
999+
$scripts = $header->getScripts();
1000+
$scripts->addFile('sql.js');
9981001

9991002
if (! $statementInfo->isSelect || isset($extraData['error'])) {
10001003
return $queryMessage;
@@ -1024,10 +1027,6 @@ private function getQueryResponseForNoResultsReturned(
10241027

10251028
$profilingChart = '';
10261029
if ($profilingResults !== []) {
1027-
$header = $response->getHeader();
1028-
$scripts = $header->getScripts();
1029-
$scripts->addFile('sql.js');
1030-
10311030
$profiling = $this->getDetailedProfilingStats($profilingResults);
10321031
if ($profiling !== []) {
10331032
$profilingChart = $this->template->render('sql/profiling_chart', ['profiling' => $profiling]);

0 commit comments

Comments
 (0)