diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 46642157db20..07a11c49fcdc 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -568,10 +568,17 @@ angular.module('ngResource', ['ng']). undefined; forEach(action, function(value, key) { - if (key != 'params' && key != 'isArray' && key != 'interceptor' && key != 'timeout') { - httpConfig[key] = copy(value); - } else if (key == 'timeout') { - httpConfig[key] = value; + switch (key) { + default: + httpConfig[key] = copy(value); + break; + case 'params': + case 'isArray': + case 'interceptor': + break; + case 'timeout': + httpConfig[key] = value; + break; } });