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/9dd9fa97
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9dd9fa97
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9dd9fa97

Branch: refs/heads/route-events
Commit: 9dd9fa97a63c2121e7552f71d01ac5d27227e80a
Parents: 9d75915
Author: Simon Metson <[email protected]>
Authored: Thu Apr 4 13:08:20 2013 +0100
Committer: Garren Smith <[email protected]>
Committed: Thu May 9 09:59:56 2013 +0200

----------------------------------------------------------------------
 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/9dd9fa97/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