diff options
author | Garren Smith <garren.smith@gmail.com> | 2014-04-25 10:57:26 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2014-04-25 10:57:26 +0200 |
commit | 8b5e4ba87fda03eb3129890a80e23def814ed4af (patch) | |
tree | 0921950719ae78b196bfa5e64376d9f544f2d824 | |
parent | 7599552b668707885e18f73b39e578c1571a69d5 (diff) | |
download | couchdb-8b5e4ba87fda03eb3129890a80e23def814ed4af.tar.gz |
Fix bug in docs list
-rw-r--r-- | src/fauxton/app/addons/documents/resources.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fauxton/app/addons/documents/resources.js b/src/fauxton/app/addons/documents/resources.js index eb6615afd..99e79a2ab 100644 --- a/src/fauxton/app/addons/documents/resources.js +++ b/src/fauxton/app/addons/documents/resources.js @@ -372,10 +372,20 @@ function(app, FauxtonAPI, PagingCollection) { // remove any query errors that may return without doc info // important for when querying keys on all docs - resp.rows = _.filter(rows, function(row){ + var cleanRows = _.filter(rows, function(row){ return row.value; }); + resp.rows = _.map(cleanRows, function(row){ + return { + _id: row.id, + _rev: row.value.rev, + value: row.value, + key: row.key, + doc: row.doc || undefined + }; + }); + return PagingCollection.prototype.parse.call(this, resp); } }); |