Skip to content

Commit

Permalink
[useCompoundParent] Display displayName only in dev (#525)
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Dudak <[email protected]>
  • Loading branch information
sai6855 and michaldudak authored Aug 6, 2024
1 parent 2860517 commit 3771ff4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mui-base/src/useCompound/useCompoundParent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export const CompoundComponentContext = React.createContext<CompoundComponentCon
any
> | null>(null);

CompoundComponentContext.displayName = 'CompoundComponentContext';
if (process.env.NODE_ENV !== 'production') {
CompoundComponentContext.displayName = 'CompoundComponentContext';
}

export interface UseCompoundParentReturnValue<Key, Subitem extends { ref: React.RefObject<Node> }> {
/**
Expand Down

0 comments on commit 3771ff4

Please sign in to comment.