IOS: error in an assignment


#1

Hi all I have this code :

RestangularProvider.setResponseExtractor(function(response) {
            var newResponse = response;
            newResponse.originalElement = response;   //THIS IS LINE 112
            return newResponse;
        });

In Android all OK, but in IOS I get this:

ERROR: Error: Attempted to assign to readonly property.
file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/app.js:112:24
file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/common/restangular.min.js:6:5068
forEach@[native code]
forEach@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/common/underscore-min.js:1:617
responseExtractor@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/common/restangular.min.js:6:5050
x@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/common/restangular.min.js:6:25625
v@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/scripts/common/restangular.min.js:6:27401
wrappedCallback@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:11573:81
wrappedCallback@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:11573:81
file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:11659:34
$eval@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:12702:28
$digest@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:12514:36
$apply@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:12806:31
done@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:8379:51
completeRequest@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:8593:15
onreadystatechange@file:///var/mobile/Applications/0799BB3F-DEF2-4BC6-A360-6D31BE7AFB43/Utrend.app/www/lib/angular/angular.js:8532:26

Where is my error ?

Thanks.

M.