Skip to content

Commit

Permalink
remove as string
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Nov 30, 2024
1 parent d16fd01 commit a0f326e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/styles/createPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function addLightOrDark(

if (!intent[direction]) {
if (intent.hasOwnProperty(shade)) {
intent[direction] = intent[shade as keyof typeof intent] as string;
intent[direction] = intent[shade as keyof typeof intent];
} else if (direction === 'light') {
intent.light = lighten(intent.main, tonalOffsetLight);
} else if (direction === 'dark') {
Expand Down Expand Up @@ -379,7 +379,7 @@ export default function createPalette(palette: PaletteOptions): Palette {
const colorInput = { ...color } as PaletteColor;

if (!colorInput.main && colorInput[mainShade as keyof typeof colorInput]) {
colorInput.main = colorInput[mainShade as keyof typeof colorInput] as string;
colorInput.main = colorInput[mainShade as keyof typeof colorInput];
}

if (!colorInput.hasOwnProperty('main')) {
Expand Down

0 comments on commit a0f326e

Please sign in to comment.