fix Databases.Status.updateSeq for the case when a database has received no
updates (e.g. is newly created).


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

Branch: refs/heads/1720-move-to-backbone-1.0
Commit: 36687689ac7f002baf2ef2627198fb9446f1b152
Parents: dce059e
Author: Simon Metson <[email protected]>
Authored: Thu Mar 21 10:25:08 2013 +0000
Committer: Simon Metson <[email protected]>
Committed: Thu Mar 28 08:43:40 2013 +0000

----------------------------------------------------------------------
 src/fauxton/app/modules/databases/resources.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/36687689/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js 
b/src/fauxton/app/modules/databases/resources.js
index e5d3fae..59dd179 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -104,8 +104,10 @@ function(app, FauxtonAPI, Documents) {
       var updateSeq = this.get("update_seq");
       if (full || (typeof(updateSeq) === 'number')) {
         return updateSeq;
-      } else {
+      } else if (updateSeq) {
         return updateSeq.split('-')[0];
+      } else {
+        return 0;
       }
     },
 

Reply via email to