FIX: do not error when no palettes are available (#160)

To repro this you had to unchecked all the "Color palette can be
selected by users" from the colors tab.
This commit is contained in:
Joffrey JAFFEUX
2025-05-13 00:18:15 +02:00
committed by GitHub
parent 86d0c03b03
commit 948c60d656
@@ -38,7 +38,7 @@ export default class UserColorPaletteSelector extends Component {
get userColorPalettes() {
const availablePalettes = listColorSchemes(this.site)
.map((userPalette) => {
?.map((userPalette) => {
return {
...userPalette,
accent: `#${
@@ -56,7 +56,7 @@ export default class UserColorPaletteSelector extends Component {
// Match the light scheme with the corresponding dark id based in the name
return (
availablePalettes
.map((palette) => {
?.map((palette) => {
if (palette.is_dark) {
return palette;
}