Open
Description
[api] Use of $.extend changes array response type into weird object
Steps
- I have dropdown that uses an API that returns an array.
- In the
onResponse
I want to modify that array, e.g. usingresponse.map(x => {...})
.
Expected Result
- My
onResponse
method is passed an actual array, not a jQuery object.
Actual Result
- However as the datatype is 'json', the response is changed from an array into an object. I cannot do array operations like
response.map
and I have unwanted properties on the object, like_super
.
Semantic-UI/dist/components/api.js
Line 485 in c4e307c
Version
2.4
Testcase
Couldn't find a mock http server that returns an json array.