diff --git a/src/app/components/SpeciesColorPicker.js b/src/app/components/SpeciesColorPicker.js index 5746a03..0dd915f 100644 --- a/src/app/components/SpeciesColorPicker.js +++ b/src/app/components/SpeciesColorPicker.js @@ -89,6 +89,13 @@ function SpeciesColorPicker({ newColorId, }); + // Ignore switching to the placeholder option. It shouldn't generally be + // doable once real options exist, and it doesn't represent a valid or + // meaningful transition in the case where it could happen. + if (newColorId === "SpeciesColorPicker-color-loading-placeholder") { + return; + } + const species = allSpecies.find((s) => s.id === speciesId); const newColor = allColors.find((c) => c.id === newColorId); const validPoses = getValidPoses(valids, speciesId, newColorId); @@ -119,6 +126,13 @@ function SpeciesColorPicker({ colorId, }); + // Ignore switching to the placeholder option. It shouldn't generally be + // doable once real options exist, and it doesn't represent a valid or + // meaningful transition in the case where it could happen. + if (newSpeciesId === "SpeciesColorPicker-species-loading-placeholder") { + return; + } + const newSpecies = allSpecies.find((s) => s.id === newSpeciesId); if (!newSpecies) { // Trying to isolate Sentry issue IMPRESS-2020-1H, where an empty species @@ -177,7 +191,7 @@ function SpeciesColorPicker({ c.id === colorId) && ( - + ) } { @@ -214,7 +230,7 @@ function SpeciesColorPicker({ s.id === speciesId) && ( - + ) } {