Defaults resultSet to object if undefined in QueryTablesApi
This commit is contained in:
parent
5a3e427249
commit
774104b34e
3
NEWS.md
3
NEWS.md
@ -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
|
||||
--------------------
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user