bugfix: Return color for just 1 category.

This commit is contained in:
dchakro 2023-09-29 13:28:47 -07:00
parent 89a26f4af9
commit fe9963de5b

View file

@ -25,7 +25,7 @@ returnPalette <-
if (class(ColorVariable) == "factor") { if (class(ColorVariable) == "factor") {
colorsNeeded <- length(levels(ColorVariable)) colorsNeeded <- length(levels(ColorVariable))
} }
if (colorsNeeded < 1) { if (colorsNeeded <= 1) {
myPalette <- c("#DD0000") myPalette <- c("#DD0000")
warning("Nothing to return color for.") warning("Nothing to return color for.")
} }