couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to 91ab94c
Date Thu, 28 May 2015 13:07:04 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 42493ee35 -> 91ab94c4b


Revert "Revert "Databases component and test fixes""

This reverts commit 42493ee3556649e72d75ded29c7b2c494663f94c.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/91ab94c4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/91ab94c4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/91ab94c4

Branch: refs/heads/master
Commit: 91ab94c4b3bdf265714b1c304c45eab2fad6eede
Parents: 42493ee
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Thu May 28 15:10:15 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Thu May 28 15:10:15 2015 +0200

----------------------------------------------------------------------
 app/addons/databases/stores.js                      | 6 +++++-
 app/addons/databases/tests/componentsSpec.react.jsx | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/91ab94c4/app/addons/databases/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/stores.js b/app/addons/databases/stores.js
index 4da6593..cdae6df 100644
--- a/app/addons/databases/stores.js
+++ b/app/addons/databases/stores.js
@@ -20,7 +20,11 @@ define([
   var DatabasesStore = FauxtonAPI.Store.extend({
 
     initialize: function () {
-      this._collection = {};
+      this.reset();
+    },
+
+    reset: function () {
+      this._collection = new Backbone.Collection();
       this._loading = false;
       this._promptVisible = false;
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/91ab94c4/app/addons/databases/tests/componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/componentsSpec.react.jsx b/app/addons/databases/tests/componentsSpec.react.jsx
index ce71390..0fe4ded 100644
--- a/app/addons/databases/tests/componentsSpec.react.jsx
+++ b/app/addons/databases/tests/componentsSpec.react.jsx
@@ -204,6 +204,9 @@ define([
       // because of the need to override typeahead, this just does a spy on the componentDidUpdate
method to ensure
       // it gets called
       assert.ok(spy.calledOnce);
+
+      // reset the store for future use
+      Stores.databasesStore.reset();
     });
   });
 


Mime
View raw message