incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Warning: minor incompatability in the 1.1.x branch with map helper functions
Date Thu, 29 Sep 2011 16:38:56 GMT
Try adding a semicolon between them. Although this is quite
unfortunate. I'm suddenly wondering if we shouldn't figure out a
different fix to the anonymous function evaluation.

On Thu, Sep 29, 2011 at 6:23 AM, Matt Goodall <matt.goodall@gmail.com> wrote:
> Hi,
>
> I just tested an app against the latest 1.1.x  branch and discovered
> something annoying but easily fixable in a view.
>
> I have a view with something like the following for the map part:
>
>    function some_helper() {
>      return "blah";
>    }
>
>    function(doc) {
>      emit(doc._id, some_helper());
>    }
>
> Note how the some_helper func is defined *outside* the anonymous map
> func. This used to work until the "Fix function evaluation by newer
> SpiderMonkey's" commit (61f10e7590bd352b367ad426a56587cbef3700b6) on
> 27th Sept.
>
> Now, I'm honestly not sure why I have a helper func outside the actual
> map func - it certainly looks a bit weird - so I'm going to move it
> inside. However, I'm fairly sure I saw that done somewhere else, so I
> thought I'd post a quick warning in case it affects anyone else.
>
> - Matt
>

Mime
View raw message