summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/apicalls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/hooks/express/apicalls.js')
-rw-r--r--src/node/hooks/express/apicalls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/hooks/express/apicalls.js b/src/node/hooks/express/apicalls.js
index db0fc81f..7f2f8ecf 100644
--- a/src/node/hooks/express/apicalls.js
+++ b/src/node/hooks/express/apicalls.js
@@ -18,7 +18,7 @@ var apiCaller = function(req, res, fields) {
apiLogger.info("RESPONSE, " + req.params.func + ", " + response);
//is this a jsonp call, if yes, add the function call
- if(req.query.jsonp)
+ if(req.query.jsonp && isVarName(response))
response = req.query.jsonp + "(" + response + ")";
res._____send(response);