src/utils/destructure.js cannot handle empty array pattern in object pattern
Open
bug
- Dominant language
- JavaScript
- Stars
- 874
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
```js
function fn3({a: []}) {}
```
fails with
> Cannot read property 'type' of undefined
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading src/utils/destructure.js and reproducing the reported function fn3({a: []}) {} case. Trace how the empty array pattern is handled, then verify that the example no longer throws "Cannot read property 'type' of undefined".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100