regression looking up keys of an object - #814
Merged
Merged
Conversation
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
approved these changes
Jul 15, 2026
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))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a recent security fix, many instances of
for (var prop in obj)were changed tofor (const prop of Object.keys(obj)). However, this throws an error ifobjis not an object. This commit creates a utility function with the desired behavour.resolves #812