Problem with map/reduce functions syntax #82

akrivoruchko opened this Issue Jan 16, 2012 · 1 comment


None yet
2 participants


I'm testing couchrest with couchdb 1.1.1-1 (Debian wheesy) and views not working at all.

Cause of the problem described here:

In a nutshell an anonymous function at the root of a scope is invalid JavaScript. I.e., the following is invalid: "function(doc) {...}" and SpiderMonkey (used by couchdb) ceased to allow this by default. Correct definition is "(function(doc){...})".
So, I propose to upgrade map/reduce function definitions.
I think it is pretty easy to do, but I'm not familiar with git. May be somebody can help.



samlown commented Jul 13, 2015

Oh my! I think this should be handled at the CouchDB level as opposed to CouchRest. Adding () around every function could create some serious hassle. Closing this for the time being.

@samlown samlown closed this Jul 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment