Index: src/collection.js |
diff --git a/src/collection.js b/src/collection.js |
index 1c6b475df6cf4761f4d25738150b1d3bfa3c44d5..86898529c3b7e8289e55b33696307c216eb3dfe5 100644 |
--- a/src/collection.js |
+++ b/src/collection.js |
@@ -485,9 +485,10 @@ $getExistingHash = GetExistingHash; |
$mapFromArray = function(array) { |
var map = new GlobalMap; |
var length = array.length; |
- for (var i = 0; i < length; ++i) { |
- var entry = array[i]; |
- %_CallFunction(map, entry[0], entry[1], MapSet); |
+ for (var i = 0; i < length; i += 2) { |
+ var key = array[i]; |
+ var value = array[i + 1]; |
+ %_CallFunction(map, key, value, MapSet); |
} |
return map; |
}; |