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);