summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/jquery.couch.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 00090619..695b0f11 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -179,7 +179,9 @@
fun = fun.toSource ? fun.toSource() : "(" + fun.toString() + ")";
$.ajax({
type: "POST", url: this.uri + "_temp_view" + encodeOptions(options),
- contentType: "javascript", data: fun, dataType: "json",
+ contentType: "application/json",
+ data: toJSON({language:"javascript", map:fun}),
+ dataType: "json",
complete: function(req) {
var resp = $.httpData(req, "json");
if (req.status == 200 && options.success) {