From 9706df061d9a243d88becdf83d53a9d790953bbb Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 7 Jan 2024 14:03:37 +0800 Subject: [PATCH] fix: fix blank page --- web/berry/src/ui-component/Label.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/berry/src/ui-component/Label.js b/web/berry/src/ui-component/Label.js index 87134c45..715c6248 100644 --- a/web/berry/src/ui-component/Label.js +++ b/web/berry/src/ui-component/Label.js @@ -115,22 +115,22 @@ const StyledLabel = styled(Box)(({ theme, ownerState }) => { // FILLED ...(filledVariant && { color: theme.palette.background.paper, - backgroundColor: theme.palette[ownerState.color].main + backgroundColor: theme.palette[ownerState.color]?.main }), // OUTLINED ...(outlinedVariant && { backgroundColor: 'transparent', - color: theme.palette[ownerState.color].main, - border: `2px solid ${theme.palette[ownerState.color].main}` + color: theme.palette[ownerState.color]?.main, + border: `2px solid ${theme.palette[ownerState.color]?.main}` }), // SOFT ...(softVariant && { color: theme.palette[ownerState.color]['dark'], - backgroundColor: alpha(theme.palette[ownerState.color].main, 0.16) + backgroundColor: alpha(theme.palette[ownerState.color]?.main, 0.16) }), // GHOST ...(ghostVariant && { - color: theme.palette[ownerState.color].main + color: theme.palette[ownerState.color]?.main }) }) };