mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure the Query Tool doesn't throw an error when viewing the contents of a table with no columns. Fixes #4492
This commit is contained in:
committed by
Dave Page
parent
76e658ee12
commit
97e39699ea
@@ -2467,8 +2467,8 @@ define('tools.querytool', [
|
||||
var explain_data_array = [],
|
||||
explain_data_json = null;
|
||||
|
||||
|
||||
if(self.colinfo[0].name == 'QUERY PLAN' && data.result
|
||||
if(data.result && !_.isEmpty(self.colinfo)
|
||||
&& self.colinfo[0].name == 'QUERY PLAN' && !_.isEmpty(data.types)
|
||||
&& data.types[0] && data.types[0].typname === 'json') {
|
||||
/* json is sent as text, parse it */
|
||||
explain_data_json = JSON.parse(data.result[0][0]);
|
||||
|
||||
Reference in New Issue
Block a user