PDA

View Full Version : [CLOSED] [4.*] Ext.Array.from does not handle an object with a length property correctly



plleeuwm
10 Dec 2013, 3:15 PM
REQUIRED INFORMATION
Ext version tested:

Ext 4.*
Description:

Ext.Array.from returns an empty array when an Object is passed in that has a length property

Code:

var dimensionData = {height: 10, width: 10, length: 10};
Ext.Array.from(dimensionData);
>[undefined 10]
delete dimensionData.length;
Ext.Array.from(dimensionData);
>[{height: 10, width: 10}]



https://fiddle.sencha.com/#fiddle/23f

Gary Schlosberg
11 Dec 2013, 9:43 AM
Thanks for the report! I am definitely able to recreate the issue, but I recommend avoiding using keywords like 'length' as field names. That said, 'length' is not a JavaScript reserved word, so I have opened a bug in our bug tracker.