Fix index when 0 len

This commit is contained in:
rxdn 2023-07-02 23:13:18 +01:00
parent 5cd6da7609
commit bc5e3ab844

View File

@ -63,9 +63,11 @@
export let seedDefault = true; export let seedDefault = true;
if (seedDefault) { if (seedDefault) {
const firstChannel = channels[0];
data = { data = {
colour: 0x7289da, colour: 0x7289da,
channels: channels[0].id, channels: firstChannel ? firstChannel.id : undefined,
panels: [], panels: [],
} }
} }