|
1 | 1 | /**
|
2 | 2 | * Restful Resources service for AngularJS apps
|
3 |
| - * @version v1.3.0 - 2014-01-29 * @link https://github.com/mgonto/restangular |
| 3 | + * @version v1.3.1 - 2014-01-29 * @link https://github.com/mgonto/restangular |
4 | 4 | * @author Martin Gontovnikas <martin@gon.to>
|
5 | 5 | * @license MIT License, http://www.opensource.org/licenses/MIT
|
6 | 6 | */(function() {
|
@@ -1053,11 +1053,11 @@ module.provider('Restangular', function() {
|
1053 | 1053 | urlHandler.resource(this, $http, request.httpConfig, request.headers, request.params, what,
|
1054 | 1054 | this[config.restangularFields.etag], operation)[method]().then(function(response) {
|
1055 | 1055 | var resData = response.data;
|
1056 |
| - if (!_.isArray(resData)) { |
1057 |
| - throw new Error("Response for getList SHOULD be an array and not an object or something else"); |
1058 |
| - } |
1059 | 1056 | var fullParams = response.config.params;
|
1060 | 1057 | var data = parseResponse(resData, operation, whatFetched, url, response, deferred);
|
| 1058 | + if (!_.isArray(data)) { |
| 1059 | + throw new Error("Response for getList SHOULD be an array and not an object or something else"); |
| 1060 | + } |
1061 | 1061 | var processedData = _.map(data, function(elem) {
|
1062 | 1062 | if (!__this[config.restangularFields.restangularCollection]) {
|
1063 | 1063 | return restangularizeElem(__this, elem, what, true, data);
|
|
0 commit comments