Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(ngResource): canceling XHR request using promise - refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
netman92 committed Aug 23, 2015
1 parent 2955bbf commit 16f3f9d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/ngResource/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});

Expand Down

0 comments on commit 16f3f9d

Please sign in to comment.