summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2014-01-29 16:41:05 +0200
committerGarren Smith <garren.smith@gmail.com>2014-01-29 16:41:05 +0200
commit136105e0d03df28ad262cc80b4ec238d4526f04f (patch)
treef67e98718799a55bfe24fb2e496b18482b286ef4
parent8f67a9f0f66b00677b44f8ac0d80bdb1350b9efe (diff)
downloadcouchdb-fauxton-file-reorder.tar.gz
Add back remove old xhrsfauxton-file-reorder
-rw-r--r--src/fauxton/app/core/routeObject.js10
-rw-r--r--src/fauxton/app/core/router.js2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/fauxton/app/core/routeObject.js b/src/fauxton/app/core/routeObject.js
index b449a2e00..f3b8672e0 100644
--- a/src/fauxton/app/core/routeObject.js
+++ b/src/fauxton/app/core/routeObject.js
@@ -229,13 +229,13 @@ function(FauxtonAPI, Backbone) {
addPromise: function (promise) {
if (_.isEmpty(promise)) { return; }
- if (_.isArray(promise)) {
- return _.each(promise, function (p) {
- this._promises.push(p);
- }, this);
+ if (!_.isArray(promise)) {
+ return this._promises.push(promise);
}
- this._promises.push(promise);
+ _.each(promise, function (p) {
+ this._promises.push(p);
+ }, this);
},
cleanup: function () {
diff --git a/src/fauxton/app/core/router.js b/src/fauxton/app/core/router.js
index 966e171f4..cc1ca4f64 100644
--- a/src/fauxton/app/core/router.js
+++ b/src/fauxton/app/core/router.js
@@ -60,7 +60,7 @@ function(FauxtonAPI, Auth, Backbone) {
authPromise.then(function () {
if (!that.activeRouteObject || !that.activeRouteObject.hasRoute(route)) {
if (that.activeRouteObject) {
- that.activeRouteObject.removeViews();
+ that.activeRouteObject.cleanup();
}
that.activeRouteObject = new RouteObject(route, masterLayout, args);
}