fix getColumns failures when QueryResult has no data

This commit is contained in:
Amir Nissim
2014-03-24 13:43:37 +02:00
parent fa2438f40d
commit 028a3e9d62

View File

@@ -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;