Skip to content

Array.from doesn't work with some iterables #359

Description

@ecolui

Consider the following code.

const l_array = ['a', 'b', 'c'];
const l_it = l_array[Symbol.iterator]();            //convert to iterator
var result = Array.from(l_it);

When that code is called from JavaScript's native Array.from, the result is ['a', 'b', 'c']

When that function is called from prototype.js Array.from, the result is []
https://github.com/prototypejs/prototype/blob/master/src/prototype/lang/array.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions