Skip to content

Commit

Permalink
fix(nanoPromise): reduce param for views should be false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jun 30, 2016
1 parent 62312d1 commit c0089a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/nanoPromise.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ exports.insertDocument = function (db, doc) {
};

exports.queryView = function (db, view, params, options) {
params = params || {};
options = options || {};
if (!options.hasOwnProperty('reduce')) {
options.reduce = false;
if (!params.hasOwnProperty('reduce')) {
params.reduce = false;
}
return new Promise((resolve, reject) => {
debug.trace(`queryView ${view}`);
Expand Down

0 comments on commit c0089a8

Please sign in to comment.