-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ensure that marshalArgs pulls wildcard info value from __data #5476
Conversation
It currently pulls the value from `changedProps` rather than __data, meaning it could provide stale data for re-entrant changes.
lib/mixins/property-effects.js
Outdated
if (structured) { | ||
let value = get(data, path); | ||
// when data is not stored e.g. `splices`, get the changed value | ||
if (value === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we want to pull the live value here, but we fall back to the stored value in props
for splices
. Adding a specific check for splices
would be best but might be a performance hit. What if we take the value in props
only if it is not === undefined
? This allows the live value to be undefined which it sometimes can be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added skipped tests and TODO to address this in a separate change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It currently pulls the value from
changedProps
rather than __data, meaning it could provide stale data for re-entrant changes.Reference Issue
Fixes #5475