Fix for setting Ddoc values on view save
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3ada73d0 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3ada73d0 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3ada73d0 Branch: refs/heads/1960-paginate-all_dbs Commit: 3ada73d04cc39fc8d37987d6a463adacc0b21195 Parents: cdb1218 Author: suelockwood <[email protected]> Authored: Fri Jan 3 15:05:00 2014 -0500 Committer: suelockwood <[email protected]> Committed: Fri Jan 3 15:05:00 2014 -0500 ---------------------------------------------------------------------- src/fauxton/app/modules/documents/resources.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/3ada73d0/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 8dd283b..14c9eba 100644 --- a/src/fauxton/app/modules/documents/resources.js +++ b/src/fauxton/app/modules/documents/resources.js @@ -96,17 +96,10 @@ function(app, FauxtonAPI) { setDdocView: function (view, map, reduce) { if (!this.isDdoc()) return false; var views = this.get('views'); - if (reduce) { - views[view] = { - map: map, - reduce: reduce - }; - } else { - views[view] = { - map: map - }; - } + views[view].reduce=reduce; + } + views[view].map= map; this.set({views: views});
