Handle resultsets with zero columns correctly in the Query Tool. Fixes #4054

This commit is contained in:
Aditya Toshniwal
2019-03-07 15:22:45 +00:00
committed by Dave Page
parent f8b9a86e95
commit 6aae9d6e20
2 changed files with 2 additions and 1 deletions

View File

@@ -2349,7 +2349,7 @@ define('tools.querytool', [
var explain_data_array = [],
explain_data_json = null;
if(data.types[0].typname === 'json') {
if(data.types[0] && data.types[0].typname === 'json') {
/* json is sent as text, parse it */
explain_data_json = JSON.parse(data.result[0]);