diff options
author | suelockwood <deathbear@apache.org> | 2014-01-15 18:10:26 -0500 |
---|---|---|
committer | suelockwood <deathbear@apache.org> | 2014-01-15 18:10:26 -0500 |
commit | 788b558c5b5b667ee5b8670ca4f87e908bdb757a (patch) | |
tree | 1a5f960d7b1fcdb9d59e277b274ce9d85ccff4a0 | |
parent | 0b9bb15688821b5657ff81445ff1b88d6ffac7a6 (diff) | |
download | couchdb-Fix-for-pouch-id-bug.tar.gz |
Docs weren't being fetched for each model in the collection when previewing an index.Fix-for-pouch-id-bug
-rw-r--r-- | src/fauxton/app/addons/documents/views.js | 9 | ||||
-rw-r--r-- | src/fauxton/app/addons/pouchdb/pouch.collate.js | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js index 99025410b..3ccd8676c 100644 --- a/src/fauxton/app/addons/documents/views.js +++ b/src/fauxton/app/addons/documents/views.js @@ -1474,14 +1474,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum fade: true }); - var promise = FauxtonAPI.Deferred(); - if (!this.database.allDocs) { - this.database.buildAllDocs({limit: Databases.DocLimit.toString(), include_docs: true}); - promise = this.database.allDocs.fetch(); - } else { - promise.resolve(); - } + this.database.buildAllDocs({limit: Databases.DocLimit.toString(), include_docs: true}); + var promise = this.database.allDocs.fetch(); promise.then(function () { params.docs = that.database.allDocs.map(function (model) { return model.get('doc');}); diff --git a/src/fauxton/app/addons/pouchdb/pouch.collate.js b/src/fauxton/app/addons/pouchdb/pouch.collate.js index 31e5650a5..8f1580819 100644 --- a/src/fauxton/app/addons/pouchdb/pouch.collate.js +++ b/src/fauxton/app/addons/pouchdb/pouch.collate.js @@ -110,6 +110,6 @@ function(app, FauxtonAPI, Collate) { return Pouch; -}).call(this); +}); |