Skip to content

Conversation

@ajivanyandev
Copy link
Contributor

No description provided.

@ajivanyandev ajivanyandev self-assigned this Dec 28, 2025
Copilot AI review requested due to automatic review settings December 28, 2025 15:20
Copy link
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 fixes a Vitest error that occurs when window.getComputedStyle is not defined during test execution. The fix adds defensive checking to prevent runtime errors in test environments where this browser API may not be available.

Key Changes:

  • Added null check for window.getComputedStyle in the readThemeMarker function to return null gracefully when the API is unavailable
  • Added comprehensive test coverage for the error handling scenario with two test cases

Reviewed changes

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

File Description
packages/devextreme/js/__internal/ui/themes.ts Added defensive check to return null when window.getComputedStyle is undefined, preventing runtime errors
packages/devextreme/testing/tests/DevExpress.ui/themes.tests.js Added new test module with two tests to verify proper handling when getComputedStyle is unavailable

@ajivanyandev ajivanyandev merged commit b26f115 into DevExpress:26_1 Dec 29, 2025
116 of 118 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.

2 participants