diff options
author | Garren Smith <garren.smith@gmail.com> | 2013-12-17 09:42:00 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2013-12-17 09:42:00 +0200 |
commit | 277b730ea4e0588af7b0082521515415a757a0ee (patch) | |
tree | cf80176a938554657b3f7d4752c91cf0f4ef1582 | |
parent | d734db08e2298941b67913e55874aa2b45d7a6bc (diff) | |
download | couchdb-277b730ea4e0588af7b0082521515415a757a0ee.tar.gz |
Fauxton: Fix bug not removing old reduce function
-rw-r--r-- | src/fauxton/app/modules/documents/resources.js | 8 | ||||
-rw-r--r-- | src/fauxton/app/modules/documents/views.js | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js index 75df7d113..863360518 100644 --- a/src/fauxton/app/modules/documents/resources.js +++ b/src/fauxton/app/modules/documents/resources.js @@ -99,11 +99,9 @@ function(app, FauxtonAPI) { reduce: reduce }; } else { - if (!views[view]) { - views[view] = {}; - } - - views[view].map = map; + views[view] = { + map: map + }; } this.set({views: views}); diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js index cac4f48e8..faf3539b6 100644 --- a/src/fauxton/app/modules/documents/views.js +++ b/src/fauxton/app/modules/documents/views.js @@ -1545,7 +1545,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum database: this.database, viewName: this.viewName, ddocName: this.model.id, - hasReduce: this.hasReduce + hasReduce: this.hasReduce() })); }, |