Closed pe1pip closed 1 year ago
I found additional issues - implementation does not work properly when providing a mapping function and calling Array.from() for string, Map and Set. String is returned as string instead of array, the other 2 throw error because they cannot find map.
Description
Array.from() is supposed to create a (shallow) copy, the shim doesn't do that if no map function is provided. This is an issue if the caller expects the original array to be unmodified if elements are pushed to the copy.
Steps to Reproduce
Preconditions: [What are the preconditions to reproduce the issue]
Expected behavior: [What you expect to happen]
A fix could be:
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce]
100%
Component/s: [What are the Build Tools for VMware Aria components affected by the issue (e.g. "common/artifact-manager", "maven/plugins/vra-ng", "typescript/vrotest", etc)]
packages/ecmascript/src/Shims.ts
Affects Build/s: [Which are the Build Tools for VMware Aria releases / builds affected by the issue]
All
Environment
Client
Server
Failure Logs
Related issues and PRs
Additional Context