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:
@@ -38,7 +38,7 @@ export default class UserColorPaletteSelector extends Component {
|
|||||||
|
|
||||||
get userColorPalettes() {
|
get userColorPalettes() {
|
||||||
const availablePalettes = listColorSchemes(this.site)
|
const availablePalettes = listColorSchemes(this.site)
|
||||||
.map((userPalette) => {
|
?.map((userPalette) => {
|
||||||
return {
|
return {
|
||||||
...userPalette,
|
...userPalette,
|
||||||
accent: `#${
|
accent: `#${
|
||||||
@@ -56,7 +56,7 @@ export default class UserColorPaletteSelector extends Component {
|
|||||||
// Match the light scheme with the corresponding dark id based in the name
|
// Match the light scheme with the corresponding dark id based in the name
|
||||||
return (
|
return (
|
||||||
availablePalettes
|
availablePalettes
|
||||||
.map((palette) => {
|
?.map((palette) => {
|
||||||
if (palette.is_dark) {
|
if (palette.is_dark) {
|
||||||
return palette;
|
return palette;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user