Skip to content

Commit a758d58

Browse files
committed
refactor($resource): change if-block to switch-block for readability
1 parent 77d4a32 commit a758d58

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ngResource/resource.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,14 @@ angular.module('ngResource', ['ng']).
568568
undefined;
569569

570570
forEach(action, function(value, key) {
571-
if (key != 'params' && key != 'isArray' && key != 'interceptor') {
572-
httpConfig[key] = copy(value);
571+
switch (key) {
572+
default:
573+
httpConfig[key] = copy(value);
574+
break;
575+
case 'params':
576+
case 'isArray':
577+
case 'interceptor':
578+
break;
573579
}
574580
});
575581

0 commit comments

Comments
 (0)