Skip to content

Commit

Permalink
getList throwing error after interceptor
Browse files Browse the repository at this point in the history
Fixes #544
  • Loading branch information
mgonto committed Jan 29, 2014
1 parent 5f19355 commit da3d055
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/restangular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,11 +1048,11 @@ module.provider('Restangular', function() {
urlHandler.resource(this, $http, request.httpConfig, request.headers, request.params, what,
this[config.restangularFields.etag], operation)[method]().then(function(response) {
var resData = response.data;
if (!_.isArray(resData)) {
throw new Error("Response for getList SHOULD be an array and not an object or something else");
}
var fullParams = response.config.params;
var data = parseResponse(resData, operation, whatFetched, url, response, deferred);
if (!_.isArray(data)) {
throw new Error("Response for getList SHOULD be an array and not an object or something else");
}
var processedData = _.map(data, function(elem) {
if (!__this[config.restangularFields.restangularCollection]) {
return restangularizeElem(__this, elem, what, true, data);
Expand Down

0 comments on commit da3d055

Please sign in to comment.