Object.values() is not resolving getters
Open
Nobody has claimed this yet.
bug
njs
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 10
Description
>> Object.values({get a() {return 1;}})
[
<empty>
]
> Object.values({get a() {return 1;}})
[ 1 ]
https://github.com/nginx/njs/blob/master/src/njs_object.c#L962
https://github.com/nginx/njs/blob/master/src/njs_object.c#L991
https://github.com/nginx/njs/blob/master/src/njs_value.c#L1065-L1071
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Object.values reproduction in the issue, then inspect the linked sections of src/njs_object.c and src/njs_value.c to trace how the getter result is handled. Confirm completion when the reproduction returns [1], matching the comparison output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100