Comparing version 4.0.3 to 4.0.4
@@ -164,5 +164,10 @@ const querystring = require('querystring') | ||
buildQueryString: (query = {}) => { | ||
if (!isPlainObject(query)) { | ||
throw new Error(`query should be an object: ${JSON.stringify(query)}`) | ||
} | ||
const q = {} | ||
viewQueryKeys.forEach(key => { | ||
if (query[key] != null) { | ||
// Avoid any possible conflict with object inherited attributes and methods | ||
if (query.hasOwnProperty(key)) { | ||
if (key === 'startkey_docid' || key === 'endkey_docid') { | ||
@@ -169,0 +174,0 @@ q[key] = query[key] |
@@ -23,3 +23,3 @@ { | ||
], | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"main": "lib/cot.js", | ||
@@ -26,0 +26,0 @@ "dependencies": { |
31274
530