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

Make Identifier.set_value work with inherited properties #157

Merged
merged 2 commits into from
Jan 9, 2022

Conversation

danieldickison
Copy link
Collaborator

bindingContext.lookup works with properties that are inherited through an object's prototype chain, but Identifer.set_value does not, which leads to asymmetrical behavior with bindings that read/write to an observable that’s inherited. This PR updates Identifier.set_value so that it works with inherited properties, in line with how knockout works.

Copy link
Member

@brianmhunt brianmhunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danieldickison Thanks for the PR! Are you ok fixing up the set_value test and adding a couple tests to the spec?

packages/utils.parser/src/Identifier.ts Outdated Show resolved Hide resolved
@brianmhunt brianmhunt merged commit ab6e9bd into knockout:main Jan 9, 2022
@danieldickison danieldickison deleted the identifier-inherit branch January 9, 2022 18:14
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.

2 participants