checking if subchannles exists

This commit is contained in:
Janis
2022-10-27 22:28:05 +02:00
parent 6d19c930c7
commit aebca9ad19
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
const CONFIG = { const CONFIG = {
apiKey: "9811add4-5ee3-436d-ae9d-d98ff53a1f12", apiKey: "",
remoteAppPort: 5899, remoteAppPort: 5899,
style: { style: {
fontBackground: "rgba(19, 20, 33, 0.5)", fontBackground: "rgba(19, 20, 33, 0.5)",

View File

@@ -6,7 +6,7 @@ function parseChannelInfos(channelInfos) {
rootChannels.forEach((rc) => { rootChannels.forEach((rc) => {
result.push(new Channel(rc.id, rc.properties.name)); result.push(new Channel(rc.id, rc.properties.name));
if (rc.id in subChannels) { if (subChannels !== null && rc.id in subChannels) {
subChannels[rc.id].forEach((sc) => { subChannels[rc.id].forEach((sc) => {
result.push(new Channel(sc.id, sc.properties.name)); result.push(new Channel(sc.id, sc.properties.name));
}); });