Index: src/collection.js |
diff --git a/src/collection.js b/src/collection.js |
index 5e4421eb1072448a186f47eb85f909cb60bdf6bb..20887dd8f7adf5f4ae61c0919c8afbd09469e341 100644 |
--- a/src/collection.js |
+++ b/src/collection.js |
@@ -23,7 +23,7 @@ function SetConstructor(iterable) { |
var iter, adder; |
if (!IS_NULL_OR_UNDEFINED(iterable)) { |
- iter = GetIterator(iterable); |
+ iter = GetIterator(ToObject(iterable)); |
adder = this.add; |
if (!IS_SPEC_FUNCTION(adder)) { |
throw MakeTypeError('property_not_function', ['add', this]); |
@@ -147,7 +147,7 @@ function MapConstructor(iterable) { |
var iter, adder; |
if (!IS_NULL_OR_UNDEFINED(iterable)) { |
- iter = GetIterator(iterable); |
+ iter = GetIterator(ToObject(iterable)); |
adder = this.set; |
if (!IS_SPEC_FUNCTION(adder)) { |
throw MakeTypeError('property_not_function', ['set', this]); |