Defaults resultSet to object if undefined in QueryTablesApi

This commit is contained in:
Raul Ochoa 2014-10-13 15:24:14 +02:00
parent 5a3e427249
commit 774104b34e
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,9 @@
1.18.2 -- 2014-mm-dd
--------------------
Bug fixes:
- Defaults resultSet to object if undefined in QueryTablesApi
1.18.1 -- 2014-10-13
--------------------

View File

@ -93,6 +93,7 @@ function runQuery(username, options, query, queryHandler, callback) {
if (shouldQueryPostgresDirectly()) {
var psql = new PSQL(options);
psql.query(query, function(err, resultSet) {
resultSet = resultSet || {};
var rows = resultSet.rows || [];
queryHandler(err, rows, callback);
});