summaryrefslogtreecommitdiff
path: root/couchjs/js
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2011-10-24 15:07:57 -0500
committerPaul J. Davis <paul.joseph.davis@gmail.com>2011-10-24 15:07:57 -0500
commitf351ee614b620f3c642cce63c95fced99ff4af46 (patch)
treec04ff1d2e1ca6a797c85c3db211a17a90a965e4b /couchjs/js
parenta5d2cea416567776369881ae5a521bf36f72ef02 (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/js')
-rw-r--r--couchjs/js/util.js4
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 + ")"]);