Skip to content

Mapping over empty Result object adds one value. #4048

Closed
@antondalgren

Description

Ethers Version

6.3.0

Search Terms

No response

Describe the Problem

Mapping over a empty result object(empty array) adds an extra value.

Code Snippet

const a = new Result();
  console.log(a.length); // 0
  const b = a.map((x) => x);
  console.log(b.length); // 1


### Contract ABI

_No response_

### Errors

_No response_

### Environment

_No response_

### Environment (Other)

_No response_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions