couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r774587 - /couchdb/trunk/share/www/script/futon.browse.js
Date Wed, 13 May 2009 23:10:44 GMT
Author: davisp
Date: Wed May 13 23:10:43 2009
New Revision: 774587

URL: http://svn.apache.org/viewvc?rev=774587&view=rev
Log:
Fixes COUCHDB-349

    Removing a _view can cause the database browser interface to break


Modified:
    couchdb/trunk/share/www/script/futon.browse.js

Modified: couchdb/trunk/share/www/script/futon.browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.browse.js?rev=774587&r1=774586&r2=774587&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Wed May 13 23:10:43 2009
@@ -292,6 +292,10 @@
               }
             },
             success: function(resp) {
+              if(!resp.views || !resp.views[localViewName]) {
+                $.cookies.remove(dbName + ".view");
+                location.href = "database.html?" + encodeURIComponent(db.name);
+              }
               var viewCode = resp.views[localViewName];
               page.viewLanguage = resp.language || "javascript";
               $("#language").val(page.viewLanguage);



Mime
View raw message