Skip to content
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

Dont leak theme properties between themes #5254

Conversation

kira-bruneau
Copy link

@kira-bruneau kira-bruneau commented Jan 16, 2023

Description

I found this really strange bug where certain properties defined in one theme would leak into the other (eg. any typography property). I eventually narrowed down the problem to the createTheme functions mutating shared state.

The fix is pretty straightforward, instead of mutating the shared state, the create functions now deep merge into an empty object. (this same pattern is already used in most other calls to deepMerge).

Scope

Patch: Bug Fix (although this is also a potentially breaking change if apps are designed to rely on this leak)

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2023

CLA assistant check
All committers have signed the CLA.

@kira-bruneau kira-bruneau force-pushed the dont-leak-theme-properties-between-themes branch from 8c27cc4 to 4be2394 Compare January 16, 2023 21:22
@kira-bruneau kira-bruneau force-pushed the dont-leak-theme-properties-between-themes branch from 4be2394 to 59c836f Compare January 16, 2023 21:30
@tajo tajo closed this Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants