Permalink
Browse files

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.
  • Loading branch information...
1 parent 75ae049 commit 9f734e042519b9e85260e40330fdcab20412427c @davisp davisp committed Oct 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 couchjs/js/util.js
View
4 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 + ")"]);

0 comments on commit 9f734e0

Please sign in to comment.