Skip to content

Commit

Permalink
Enable to convert to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
pimvdb committed Jun 13, 2012
1 parent 56a1a30 commit db22324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/couchdb.js
Expand Up @@ -77,7 +77,7 @@ exports.toJSON = function(data) {
// Encode only key, startkey and endkey as JSON // Encode only key, startkey and endkey as JSON
exports.toQuery = function(query) { exports.toQuery = function(query) {
for (var k in query) { for (var k in query) {
if (['key', 'startkey', 'endkey'].indexOf(k) != -1) { if (['key', 'keys', 'startkey', 'endkey'].indexOf(k) != -1) {
query[k] = JSON.stringify(query[k]); query[k] = JSON.stringify(query[k]);
} else { } else {
query[k] = String(query[k]); query[k] = String(query[k]);
Expand Down

0 comments on commit db22324

Please sign in to comment.