couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to 1be2a77
Date Fri, 05 Dec 2014 16:57:21 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 6de99480d -> 1be2a7713


Fix bulkDeleteDocsCollection errors

There are a couple of JS errors that occur when going to and from
the Views page. This just adds a check to confirm a var is really
available before using it.


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

Branch: refs/heads/master
Commit: 1be2a77134399189ac613f1b3344ef677967c98d
Parents: 6de9948
Author: Benjamin Keen <ben.keen@gmail.com>
Authored: Thu Dec 4 15:09:05 2014 -0800
Committer: Benjamin Keen <ben.keen@gmail.com>
Committed: Fri Dec 5 08:57:05 2014 -0800

----------------------------------------------------------------------
 app/addons/documents/views.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/1be2a771/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 24dfbfd..06d092c 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -397,7 +397,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
         return;
       }
 
-      if (this.bulkDeleteDocsCollection.length === 0) {
+      if (!this.bulkDeleteDocsCollection || this.bulkDeleteDocsCollection.length === 0) {
         return;
       }
       this.$('.js-all').addClass('active');
@@ -493,7 +493,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
       this.allDocsNumber && this.allDocsNumber.remove();
       _.each(this.rows, function (row) {row.remove();});
 
-      this.bulkDeleteDocsCollection.reset();
+      if (this.bulkDeleteDocsCollection) {
+        this.bulkDeleteDocsCollection.reset();
+      }
     },
 
     removeNestedViews: function () {


Mime
View raw message