You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The array check (using Ember.isArray) in the SerializeResponse _normalizeSerializerPayload returns true for a payload object ([object Object]) with a length data attribute. This yielded a data object with several attributes with undefined as the value.
Ember: 1.13.2 & Ember Data: 1.13.2
Expected Behavior
A payload object with length data attribute should NOT be evaluated as an Array and go through the trueblock.
The JSON API we were using returned a resource with several attributes one of which was length.
{
"id": 123,
"width": 10,
"length": 15
}
Note: Don't use length or any possible reserved keywords in your API. We have changed our API to now return size_length vs. length. It goes along the same line as using lng vs. long for longitude.
The text was updated successfully, but these errors were encountered:
kalebdf
changed the title
Payload object with length attribute Normalize Serializer Payload
Odd behavior with payload object with length attribute in Normalize Serializer Payload
Jun 18, 2015
Current Behavior
The array check (using
Ember.isArray
) in the SerializeResponse _normalizeSerializerPayload returns true for apayload
object ([object Object]
) with alength
data attribute. This yielded adata
object with several attributes withundefined
as the value.Ember: 1.13.2 & Ember Data: 1.13.2
Expected Behavior
A
payload
object withlength
data attribute should NOT be evaluated as anArray
and go through thetrue
block.cc/ @bmac
The JSON API we were using returned a resource with several attributes one of which was
length
.Note: Don't use
length
or any possible reserved keywords in your API. We have changed our API to now returnsize_length
vs.length
. It goes along the same line as usinglng
vs.long
for longitude.The text was updated successfully, but these errors were encountered: