diff options
Diffstat (limited to 'share/server/loop.js')
-rw-r--r-- | share/server/loop.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/server/loop.js b/share/server/loop.js index 84e35dc5..a988684f 100644 --- a/share/server/loop.js +++ b/share/server/loop.js @@ -20,11 +20,13 @@ function init_sandbox() { sandbox.sum = Views.sum; sandbox.log = log; sandbox.toJSON = Couch.toJSON; + sandbox.JSON = JSON; sandbox.provides = Mime.provides; sandbox.registerType = Mime.registerType; sandbox.start = Render.start; sandbox.send = Render.send; sandbox.getRow = Render.getRow; + sandbox.isArray = isArray; } catch (e) { log(e.toSource()); } @@ -73,7 +75,7 @@ var DDoc = (function() { if (i+1 == funPath.length) { fun = point[funPath[i]] if (typeof fun != "function") { - fun = Couch.compileFunction(fun); + fun = Couch.compileFunction(fun, ddoc); // cache the compiled fun on the ddoc point[funPath[i]] = fun }; |