Skip to content

Commit

Permalink
try suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Dec 3, 2024
1 parent ba508e6 commit 260488a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/mui-material/src/styles/createPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,14 @@ export default function createPalette(palette: PaletteOptions): Palette {
let modeHydrated: ReturnType<typeof getLight> | ReturnType<typeof getDark>;
if (mode === 'light') {
modeHydrated = getLight();
} else {
} else if (mode === 'dark') {
modeHydrated = getDark();
}

if (process.env.NODE_ENV !== 'production') {
if (!modeHydrated) {
} else {
if (process.env.NODE_ENV !== 'production') {
console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
}
// Should never reach here due to the default value, but safeguard
modeHydrated = getLight();
}

const paletteOutput = deepmerge(
Expand Down

0 comments on commit 260488a

Please sign in to comment.