Skip to content

Commit

Permalink
fix: handle undefined colors in chart options
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Feb 22, 2024
1 parent eeb0609 commit 1589e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/Controls/ColorPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ watch(selectedPalette, () => (colors.value = selectedPaletteColors.value))
const selectedPaletteColors = computed(() => getPaletteColors(selectedPalette.value.value))
const colors = defineModel()
if (colors.value?.length === 0) {
if (!colors.value?.length) {
selectedPalette.value = colorPaletteOptions.at(0)
} else if (isCustomPalette(colors.value)) {
selectedPalette.value = colorPaletteOptions.at(-1)
Expand Down

0 comments on commit 1589e79

Please sign in to comment.