Skip to content

Commit edabc0c

Browse files
committed
make req.jsonp optional
1 parent 4819483 commit edabc0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (opt) {
2828
return function (req, res, next) {
2929
if (!res.__isJSONMaskWrapped) {
3030
res.json = wrap(res.json.bind(res));
31-
res.jsonp = wrap(res.jsonp.bind(res));
31+
if (req.jsonp) res.jsonp = wrap(res.jsonp.bind(res));
3232
res.__isJSONMaskWrapped = true;
3333
}
3434
next();

0 commit comments

Comments
 (0)