diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2011-10-24 15:07:57 -0500 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2011-10-25 14:13:40 -0500 |
commit | 9f734e042519b9e85260e40330fdcab20412427c (patch) | |
tree | 03302b2df2df615f9655de913fa50791730e0fa2 /couchjs | |
parent | 75ae049c3595a5c4b074a6f518ce9c1da0c577b2 (diff) |
Fix SpiderMonkey source evaluation
Looks like we had a couple commits get crossed over during the merges.
This removes the original version of the patch that wrapped JS functions
with parens.
Diffstat (limited to 'couchjs')
-rw-r--r-- | couchjs/js/util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/couchjs/js/util.js b/couchjs/js/util.js index a7449315..0b812fe1 100644 --- a/couchjs/js/util.js +++ b/couchjs/js/util.js @@ -91,9 +91,9 @@ var Couch = { } sandbox.require = require; } - var functionObject = evalcx("(" + source + ")", sandbox); + var functionObject = evalcx(source, sandbox); } else { - var functionObject = eval("(" + source + ")"); + var functionObject = eval(source); } } catch (err) { throw(["error", "compilation_error", err.toSource() + " (" + source + ")"]); |