Skip to content

Fix setting File as value in store (T1327666)#33582

Open
GoodDayForSurf wants to merge 15 commits into
DevExpress:26_1from
GoodDayForSurf:26_1_T1327666
Open

Fix setting File as value in store (T1327666)#33582
GoodDayForSurf wants to merge 15 commits into
DevExpress:26_1from
GoodDayForSurf:26_1_T1327666

Conversation

@GoodDayForSurf
Copy link
Copy Markdown
Contributor

No description provided.

@GoodDayForSurf GoodDayForSurf marked this pull request as ready for review May 18, 2026 20:40
Copilot AI review requested due to automatic review settings May 18, 2026 20:40
@GoodDayForSurf GoodDayForSurf requested review from a team and ajivanyandev May 18, 2026 20:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes T1327666 where assigning a File (or Blob) as a value through deepExtendArraySafe/newAssign would corrupt the value by attempting to deep-clone it via Object.create(Object.getPrototypeOf(item)). The fix short-circuits deepExtendArraySafe when changes is a Blob-like instance, returning it by reference.

Changes:

  • Add isBlobLike helper that safely checks for Blob (guarding against environments where Blob is undefined).
  • Short-circuit deepExtendArraySafe to return the value when changes is a Blob/File.
  • Add a QUnit test verifying Blob/File values are preserved by reference both as nested properties and as the top-level changes argument.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/devextreme/js/__internal/core/utils/m_object.ts Adds isBlobLike guard and early return in deepExtendArraySafe to preserve Blob/File references.
packages/devextreme/testing/tests/DevExpress.core/utils.object.tests.js New QUnit test covering Blob/File assignment via deepExtendArraySafe with newAssign.

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.

2 participants