Skip to content

Array.from should not touch Array.prototype setters (createDataPropertyOrThrow) #415

Closed
@Yaffle

Description

An edge case...

Object.defineProperty(Object.prototype, "0", {
  set: function () {
    throw new Error();
  },
  get: function () {
    return undefined;
  }
});

Array.from({length: 1}); // should not throw here

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions