diff options
author | Christopher Lenz <cmlenz@apache.org> | 2009-07-22 21:41:41 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2009-07-22 21:41:41 +0000 |
commit | ff513dbb4c027ca85f67f4b9f9039efec2ea3dfe (patch) | |
tree | 3bc50c5ddec08a24674e0a1d68ac5afd4314860d /share | |
parent | a7a6c6a7370cf6723011ebd174406df231cf4517 (diff) |
Ignore whitespace in reduce code textarea in Futon. Closes COUCHDB-328.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796888 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r-- | share/www/script/futon.browse.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js index 4cb3eb6a..e6875948 100644 --- a/share/www/script/futon.browse.js +++ b/share/www/script/futon.browse.js @@ -602,8 +602,8 @@ $("#viewcode").show().removeClass("collapsed"); var mapFun = $("#viewcode_map").val(); $.cookies.set(db.name + ".map", mapFun); - var reduceFun = $("#viewcode_reduce").val() || null; - if (reduceFun != null) { + var reduceFun = $.trim($("#viewcode_reduce").val()) || null; + if (reduceFun) { $.cookies.set(db.name + ".reduce", reduceFun); options.group = true; } else { @@ -618,7 +618,7 @@ } else { $("#viewcode").show(); var currentMapCode = $("#viewcode_map").val(); - var currentReduceCode = $("#viewcode_reduce").val() || null; + var currentReduceCode = $.trim($("#viewcode_reduce").val()) || null; if (currentReduceCode) { options.group = true; } |