Skip to content

Fix TypeError on accessing a component instance while unmounting (T1327953)#33513

Merged
GoodDayForSurf merged 7 commits intoDevExpress:26_1from
GoodDayForSurf:26_1_T1327953
May 8, 2026
Merged

Fix TypeError on accessing a component instance while unmounting (T1327953)#33513
GoodDayForSurf merged 7 commits intoDevExpress:26_1from
GoodDayForSurf:26_1_T1327953

Conversation

@GoodDayForSurf
Copy link
Copy Markdown
Contributor

No description provided.

@dxvladislavvolkov dxvladislavvolkov self-requested a review May 7, 2026 06:46
@GoodDayForSurf GoodDayForSurf reopened this May 7, 2026
@GoodDayForSurf GoodDayForSurf marked this pull request as ready for review May 8, 2026 06:47
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

This PR addresses a React wrapper edge case where an option-change callback can trigger component unmount/disposal while OptionsManager.onOptionChanged is still executing, previously leading to a TypeError when accessing the widget instance.

Changes:

  • Prevents a crash by making the skipOptionsRollBack access safe when the instance becomes unavailable during unmount.
  • Adds a regression test covering disposal/unmount during an option change handler (T1327953).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme-react/src/core/options-manager.ts Makes skipOptionsRollBack access resilient to instance becoming null during onOptionChanged.
packages/devextreme-react/src/core/tests/props-updating.test.tsx Adds a test ensuring onOptionChanged doesn’t throw if the option change handler disposes the manager.

Comment thread packages/devextreme-react/src/core/options-manager.ts
@GoodDayForSurf GoodDayForSurf merged commit 4ec16b4 into DevExpress:26_1 May 8, 2026
177 of 178 checks passed
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.

4 participants