diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | share/www/script/futon.browse.js | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -32,5 +32,6 @@ suggesting improvements or submitting changes. Some of these people are: * Robert Newson <robert.newson@gmail.com> * Bob Dionne <dionne@member.fsf.org> * Mark Hammond <mhammond@skippinet.com.au> + * Kevin Ilchmann Jørgensen <kijmail@gmail.com> For a list of authors see the `AUTHORS` file. 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; } |