Skip to content

Make Identifier.set_value work with inherited properties#157

Merged
brianmhunt merged 2 commits into
knockout:mainfrom
bandcampdotcom:identifier-inherit
Jan 9, 2022
Merged

Make Identifier.set_value work with inherited properties#157
brianmhunt merged 2 commits into
knockout:mainfrom
bandcampdotcom:identifier-inherit

Conversation

@danieldickison

Copy link
Copy Markdown
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.

@brianmhunt brianmhunt left a comment

Copy link
Copy Markdown
Member

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?

Comment thread packages/utils.parser/src/Identifier.ts Outdated
@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