Skip to content

Conversation

MatiPl01
Copy link
Member

@MatiPl01 MatiPl01 commented Aug 26, 2025

Summary

Test plan

@MatiPl01 MatiPl01 self-assigned this Aug 26, 2025
Comment on lines +258 to +272
/**
* If the animated prop is an array, we need to directly set each
* property (manually spread it). This prevents issues where the color
* prop might be incorrectly linked with its `toValue` and `current`
* states, causing abrupt transitions or 'jumps' in animation states.
*/
if (Array.isArray(updates[propName])) {
updates[propName].forEach((obj) => {
for (const prop in obj) {
if (!last[propName] || typeof last[propName] !== 'object') {
last[propName] = {};
}
last[propName][prop] = obj[prop];
}
});
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Fix this code, it is invalid as it assumes that array can only contain objects which is not true (e.g. see fontVariant prop which is an array of strings).

This implementation should be generalized for any structure, not just arrays of objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant