summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuelockwood <deathbear@apache.org>2014-01-03 15:05:00 -0500
committersuelockwood <deathbear@apache.org>2014-01-03 15:05:00 -0500
commit3ada73d04cc39fc8d37987d6a463adacc0b21195 (patch)
treeccc2e1cfc2b9702fa0a4108f5e546c4c4936c122
parentcdb1218123486eb3abf51706b1bd5c1fe7eb7241 (diff)
downloadcouchdb-3ada73d04cc39fc8d37987d6a463adacc0b21195.tar.gz
Fix for setting Ddoc values on view save
-rw-r--r--src/fauxton/app/modules/documents/resources.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 8dd283b91..14c9ebaea 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});