summaryrefslogtreecommitdiff
path: root/share/www/script/futon.browse.js
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2009-05-13 23:10:43 +0000
committerPaul Joseph Davis <davisp@apache.org>2009-05-13 23:10:43 +0000
commite69ff9662344905fbac5d045259e791227772a18 (patch)
treefc53b4525a0cc9904437b3f57334a35fb2006436 /share/www/script/futon.browse.js
parentc044a331eda306bac2383aecb9996f987029dba0 (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/futon.browse.js')
-rw-r--r--share/www/script/futon.browse.js4
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);