Skip to main content
added 44 characters in body
Source Link
Robs
  • 9.4k
  • 21
  • 119
  • 224

It seems that with Spring 20, the response from apex has become non-extensible with additional parameters.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions

As workaround you can use result = Object.assign({}, result) for objects, or item = Object.assign({}, item) in a loop for each item in result for arrays

Or spread syntax data = { ...result };

Or one more dirty hack is JSON.parse(JSON.stringify(result));

It seems that with Spring 20, the response from apex has become non-extensible with additional parameters.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions

As workaround you can use result = Object.assign({}, result) for objects, or item = Object.assign({}, item) in a loop for each item in result for arrays

Or one more dirty hack is JSON.parse(JSON.stringify(result));

It seems that with Spring 20, the response from apex has become non-extensible with additional parameters.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions

As workaround you can use result = Object.assign({}, result) for objects, or item = Object.assign({}, item) in a loop for each item in result for arrays

Or spread syntax data = { ...result };

Or one more dirty hack is JSON.parse(JSON.stringify(result));

Source Link

It seems that with Spring 20, the response from apex has become non-extensible with additional parameters.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions

As workaround you can use result = Object.assign({}, result) for objects, or item = Object.assign({}, item) in a loop for each item in result for arrays

Or one more dirty hack is JSON.parse(JSON.stringify(result));