couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [11/47] couchdb commit: updated refs/heads/Update-Sidebar-Ui to c173e52
Date Mon, 19 May 2014 16:17:29 GMT
Fix bug in docs list


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/8b5e4ba8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/8b5e4ba8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/8b5e4ba8

Branch: refs/heads/Update-Sidebar-Ui
Commit: 8b5e4ba87fda03eb3129890a80e23def814ed4af
Parents: 7599552
Author: Garren Smith <garren.smith@gmail.com>
Authored: Fri Apr 25 10:57:26 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Fri Apr 25 10:57:26 2014 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/resources.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/8b5e4ba8/src/fauxton/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/resources.js b/src/fauxton/app/addons/documents/resources.js
index eb6615a..99e79a2 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);
     }
   });


Mime
View raw message