diff options
author | Paul Joseph Davis <davisp@apache.org> | 2009-05-13 23:10:43 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2009-05-13 23:10:43 +0000 |
commit | e69ff9662344905fbac5d045259e791227772a18 (patch) | |
tree | fc53b4525a0cc9904437b3f57334a35fb2006436 /share/www/script | |
parent | c044a331eda306bac2383aecb9996f987029dba0 (diff) |
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
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/futon.browse.js | 4 |
1 files changed, 4 insertions, 0 deletions
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); |