diff options
| author | Karl Seamon | 2011-08-18 15:07:04 -0400 |
|---|---|---|
| committer | Karl Seamon | 2011-08-18 15:07:04 -0400 |
| commit | 6114c8f504e99fecb0d62cce4beb3a8f39f301ec (patch) | |
| tree | 6e8567b0a64ed3f2e1569d184617985042744760 /src | |
| parent | b99b0a80723ad3a9b43e9ef36869f521eaec19ec (diff) | |
| download | angular.js-6114c8f504e99fecb0d62cce4beb3a8f39f301ec.tar.bz2 | |
fix($resource): properly call error callback when resource is called with two arguments
Diffstat (limited to 'src')
| -rw-r--r-- | src/Resource.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Resource.js b/src/Resource.js index 3c149d8b..74d952ed 100644 --- a/src/Resource.js +++ b/src/Resource.js @@ -76,9 +76,16 @@ ResourceFactory.prototype = { case 4: error = a4; success = a3; + //fallthrough case 3: case 2: if (isFunction(a2)) { + if (isFunction(a1)) { + success = a1; + error = a2; + break; + } + success = a2; error = a3; //fallthrough |
