Skip to content

regression looking up keys of an object - #814

Merged
mattbaileyuk merged 1 commit into
masterfrom
object_keys
Jul 15, 2026
Merged

regression looking up keys of an object#814
mattbaileyuk merged 1 commit into
masterfrom
object_keys

Conversation

@andrew-coleman

Copy link
Copy Markdown
Member

In a recent security fix, many instances of for (var prop in obj) were changed to for (const prop of Object.keys(obj)). However, this throws an error if obj is not an object. This commit creates a utility function with the desired behavour.

resolves #812

In a recent security fix, many instances of
`for (var prop in obj)` were changed to
`for (const prop of Object.keys(obj))`.
However, this throws an error if `obj` is not an object.
This commit creates a utility function with the desired
behavour.
@mattbaileyuk
mattbaileyuk merged commit 82e1597 into master Jul 15, 2026
8 checks passed
@mattbaileyuk
mattbaileyuk deleted the object_keys branch July 15, 2026 13:45
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Jul 27, 2026
##### [v2.2.2](https://github.com/jsonata-js/jsonata/blob/HEAD/CHANGELOG.md#222-Maintenance-Release)

- Update TypeScript type definitions (PR [#807](jsonata-js/jsonata#807))
- Fix `$contains()` when the token is undefined (PR [#809](jsonata-js/jsonata#809))
- Regression looking up keys of an object (PR [#814](jsonata-js/jsonata#814))
- Race condition when $$ used concurrently (PR [#816](jsonata-js/jsonata#816))
- Correctly handle empty joins (PR [#817](jsonata-js/jsonata#817))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$each fails on partial data

2 participants