diff --git a/lib/shared-method.js b/lib/shared-method.js index c7a62ca..097f74a 100644 --- a/lib/shared-method.js +++ b/lib/shared-method.js @@ -415,12 +415,16 @@ SharedMethod.getType = function(val, targetType) { */ SharedMethod.convertArg = function(accept, raw) { - if (accept.http && (accept.http.source === 'req' || + var isComputedArgument = accept.http && ( + typeof accept.http === 'function' || + accept.http.source === 'req' || accept.http.source === 'res' || - accept.http.source === 'context' - )) { + accept.http.source === 'context'); + + if (isComputedArgument) { return raw; } + if (raw === null || typeof raw !== 'object') { return raw; }