add null check

This commit is contained in:
jane 2021-06-04 22:21:54 -04:00
parent 4b956fdff0
commit 724e334c26

View file

@ -99,7 +99,7 @@ function tick_pattern() {
let parsed = pattern.parsed; let parsed = pattern.parsed;
if (parsed.length > 0) { if (parsed && parsed.length > 0) {
for (let i = 0; i < cfg.leds; i++) { for (let i = 0; i < cfg.leds; i++) {
for (let id in parsed) { for (let id in parsed) {
let command = parsed[id]; let command = parsed[id];