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

Commit 8d4d3d5

Browse files
committed
refactor($resource): use route.defaults (already merged provider.defaults + options)
Closes #15160
1 parent bf61c14 commit 8d4d3d5

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
@@ -642,9 +642,8 @@ angular.module('ngResource', ['ng']).
642642
forEach(actions, function(action, name) {
643643
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
644644
var numericTimeout = action.timeout;
645-
var cancellable = isDefined(action.cancellable) ? action.cancellable :
646-
(options && isDefined(options.cancellable)) ? options.cancellable :
647-
provider.defaults.cancellable;
645+
var cancellable = isDefined(action.cancellable) ?
646+
action.cancellable : route.defaults.cancellable;
648647

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

0 commit comments

Comments
 (0)