Fix length issue in OrderedMaps

Previously, a definiton with a 'length' property with numeric value
would result in an OrderedMap of that length.

This is now fixed and covered by tests
This commit is contained in:
Leon Weidauer
2017-07-20 12:01:00 +02:00
parent 8775c63fb4
commit 25c63b5f76
2 changed files with 30 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ export function fromJSOrdered (js) {
return !isObject(js) ? js :
Array.isArray(js) ?
Im.Seq(js).map(fromJSOrdered).toList() :
Im.Seq(js).map(fromJSOrdered).toOrderedMap()
Im.OrderedMap(js).map(fromJSOrdered)
}
export function bindToState(obj, state) {