| Index: src/js/typedarray.js
|
| diff --git a/src/js/typedarray.js b/src/js/typedarray.js
|
| index e771310ceaf26a9a1f1a25e1d9823fc2d214a56c..50aae94bdcca99cbc567901d775e767bbac5f7b4 100644
|
| --- a/src/js/typedarray.js
|
| +++ b/src/js/typedarray.js
|
| @@ -262,17 +262,18 @@
|
| if (!IS_UNDEFINED(new.target)) {
|
| if (IS_ARRAYBUFFER(arg1) || IS_SHAREDARRAYBUFFER(arg1)) {
|
| NAMEConstructByArrayBuffer(this, arg1, arg2, arg3);
|
| + } else if (IS_NUMBER(arg1) || IS_STRING(arg1) ||
|
| + IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) {
|
| + NAMEConstructByLength(this, arg1);
|
| } else if (IS_TYPEDARRAY(arg1)) {
|
| NAMEConstructByTypedArray(this, arg1);
|
| - } else if (IS_RECEIVER(arg1)) {
|
| + } else {
|
| var iteratorFn = arg1[iteratorSymbol];
|
| if (IS_UNDEFINED(iteratorFn) || iteratorFn === ArrayValues) {
|
| NAMEConstructByArrayLike(this, arg1, arg1.length);
|
| } else {
|
| NAMEConstructByIterable(this, arg1, iteratorFn);
|
| }
|
| - } else {
|
| - NAMEConstructByLength(this, arg1);
|
| }
|
| } else {
|
| throw MakeTypeError(kConstructorNotFunction, "NAME")
|
|
|