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

Commit 024bc1e

Browse files
gkalpakpetebacondarwin
authored andcommitted
refactor($resource): use route.defaults (already merged provider.defaults + options)
Closes #15160
1 parent 7e7b515 commit 024bc1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ngResource/resource.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -676,9 +676,8 @@ angular.module('ngResource', ['ng']).
676676
forEach(actions, function(action, name) {
677677
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
678678
var numericTimeout = action.timeout;
679-
var cancellable = isDefined(action.cancellable) ? action.cancellable :
680-
(options && isDefined(options.cancellable)) ? options.cancellable :
681-
provider.defaults.cancellable;
679+
var cancellable = isDefined(action.cancellable) ?
680+
action.cancellable : route.defaults.cancellable;
682681

683682
if (numericTimeout && !isNumber(numericTimeout)) {
684683
$log.debug('ngResource:\n' +

0 commit comments

Comments
 (0)