Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
fix: experimental provider for color mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-tailor committed Oct 11, 2023
1 parent 9f80d54 commit 1791086
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/src/StyledProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const StyledProvider: React.FC<{

onChange((currentColor: string) => {
// only for web
if (!_experimentalNestedProviderRef) {
if (!_experimentalNestedProvider) {
const documentElement = document.documentElement;

if (Platform.OS === 'web') {
Expand Down Expand Up @@ -162,6 +162,7 @@ export const StyledProvider: React.FC<{
setAnimationDriverData,
inlineStyleMap: inlineStyleMap.current,
};

if (_experimentalNestedProvider) {
//@ts-ignore
styledData._experimentalNestedProvider = _experimentalNestedProvider;
Expand Down

0 comments on commit 1791086

Please sign in to comment.