-
Notifications
You must be signed in to change notification settings - Fork 658
ArrayStore: Objects in nested array lose their type when array is updated (T1309567) #31884
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
base: 25_2
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR fixes a bug in the ArrayStore where objects in nested arrays would lose their custom prototypes (type information) when the array is updated. The fix preserves the prototype chain for non-plain objects during deep copy operations.
Key Changes
- Modified
getDeepCopyTargetfunction to preserve object prototypes usingObject.create(Object.getPrototypeOf(item))for non-plain objects - The fix aligns with existing patterns in the codebase (e.g.,
cloneInstanceWithChangedPathsinm_array_utils.ts)
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
No description provided.