From e69ff9662344905fbac5d045259e791227772a18 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Wed, 13 May 2009 23:10:43 +0000 Subject: Fixes COUCHDB-349 Removing a _view can cause the database browser interface to break git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@774587 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/futon.browse.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index d5fe9afa..a360a343 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -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); -- cgit v1.2.3