diff --git a/docs/.vitepress/theme/components/ColorPicker.vue b/docs/.vitepress/theme/components/ColorPicker.vue index a4102dace..efafa54ba 100644 --- a/docs/.vitepress/theme/components/ColorPicker.vue +++ b/docs/.vitepress/theme/components/ColorPicker.vue @@ -202,6 +202,7 @@ onMounted(async () => { }) watch(selectedColor, async (color) => { + if (!color) return; const theme = generateThemeFromColor(color) themeRegistry[`color-${color}`] = theme // Explicitly set the theme to override any previous selection @@ -225,7 +226,7 @@ const toggleAmoled = () => {