remove reduce when setting view on ddoc
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/b61105d7 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/b61105d7 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/b61105d7 Branch: refs/heads/1960-paginate-all_dbs Commit: b61105d759ec4ec1fa4ec7d28d32357f9df050d3 Parents: 3ada73d Author: suelockwood <[email protected]> Authored: Fri Jan 3 15:16:46 2014 -0500 Committer: suelockwood <[email protected]> Committed: Fri Jan 3 15:16:46 2014 -0500 ---------------------------------------------------------------------- src/fauxton/app/modules/documents/resources.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/b61105d7/src/fauxton/app/modules/documents/resources.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js index 14c9eba..8901f5a 100644 --- a/src/fauxton/app/modules/documents/resources.js +++ b/src/fauxton/app/modules/documents/resources.js @@ -97,10 +97,11 @@ function(app, FauxtonAPI) { if (!this.isDdoc()) return false; var views = this.get('views'); if (reduce) { - views[view].reduce=reduce; - } + views[view].reduce=reduce; + } else { + delete views[view].reduce; + } views[view].map= map; - this.set({views: views}); return true;
