set color to 'random' if undefined

This commit is contained in:
Daniel Sommer 2021-04-07 12:08:30 +02:00
parent 231bcd19cc
commit 5231d683b0

View file

@ -34,7 +34,7 @@ function powerOff() {
// parse a color object from given request arguments
function parseColor(value) {
if (value == RANDOM) {
if (!value || value == RANDOM) {
return RANDOM;
}
let parsedColor = parseRGBColor(value);