Index: src/collection.js |
diff --git a/src/collection.js b/src/collection.js |
index 9b5716687bcc14ed06e628afd15de795b07c1a14..8d2d18428602b85979ff98afde6f60ea2c30ff92 100644 |
--- a/src/collection.js |
+++ b/src/collection.js |
@@ -23,11 +23,11 @@ function SetConstructor(iterable) { |
var iter, adder; |
if (!IS_NULL_OR_UNDEFINED(iterable)) { |
- iter = GetIterator(iterable); |
adder = this.add; |
if (!IS_SPEC_FUNCTION(adder)) { |
throw MakeTypeError('property_not_function', ['add', this]); |
} |
+ iter = GetIterator(iterable); |
} |
%_SetInitialize(this); |
@@ -163,11 +163,11 @@ function MapConstructor(iterable) { |
var iter, adder; |
if (!IS_NULL_OR_UNDEFINED(iterable)) { |
- iter = GetIterator(iterable); |
adder = this.set; |
if (!IS_SPEC_FUNCTION(adder)) { |
throw MakeTypeError('property_not_function', ['set', this]); |
} |
+ iter = GetIterator(iterable); |
} |
%_MapInitialize(this); |