mirror of
https://github.com/getredash/redash.git
synced 2026-05-09 12:01:08 -04:00
fix getColumns failures when QueryResult has no data
This commit is contained in:
@@ -182,10 +182,10 @@
|
||||
};
|
||||
|
||||
QueryResult.prototype.getColumns = function () {
|
||||
if (this.columns == undefined) {
|
||||
if (this.columns == undefined && this.query_result.data) {
|
||||
this.columns = _.map(this.query_result.data.columns, function(v) {
|
||||
return v.name;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return this.columns;
|
||||
|
||||
Reference in New Issue
Block a user