array properties get converted to objects

Author: nedtCreated Dec 18, 2015Updated Apr 18, 2017

I try to set a property as array, because I have a variable list of items I'd like to add. But when the properties get assigned to the browser DOM node the property is converted to an object with numeric keys in applyProperties()

Example:

javascript
var h = require('virtual-dom/h');
var createElement = require('virtual-dom/create-element');

var tree = h('div', {id: 'myel', list: [1, 2, 3]});
var rootNode = createElement(tree);
document.body.appendChild(rootNode);

console.log(document.getElementById('myel').list);
console.log(tree.properties.list);

Expected result:

javascript
[1, 2, 3]
[1, 2, 3]

Actual result:

javascript
Object {0: 1, 1: 2, 2: 3}
[1, 2, 3]