Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where for certain path segments, collection generation failed. #723

Merged
merged 1 commit into from
May 17, 2023

Conversation

VShingala
Copy link
Member

RCA

When the definition had certain path that contained same name as standard JS prototype properties, collection generation was failing with TypeError.

For example, path like /constructor/v3/update-constructor.

We have following logic to determine if children already is present. Ideally, this should resolve to false while execution but because all JS object has a property called constructor. This was passing and further logic was not maintained correctly.

Fix

Rather than directly accessing the properties, we'll now rely on Object.hasOwnProperty() function that makes sure it's true only when object has such own property.

@VShingala VShingala merged commit 1b79472 into develop May 17, 2023
6 checks passed
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.

None yet

2 participants