From aebca9ad193e891acf59442b03ce562a19f00e16 Mon Sep 17 00:00:00 2001 From: Janis Date: Thu, 27 Oct 2022 22:28:05 +0200 Subject: [PATCH] checking if subchannles exists --- config.js | 2 +- js/parser.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index c987d87..cdbfe9f 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ const CONFIG = { - apiKey: "9811add4-5ee3-436d-ae9d-d98ff53a1f12", + apiKey: "", remoteAppPort: 5899, style: { fontBackground: "rgba(19, 20, 33, 0.5)", diff --git a/js/parser.js b/js/parser.js index 442a0bf..1efb264 100644 --- a/js/parser.js +++ b/js/parser.js @@ -6,7 +6,7 @@ function parseChannelInfos(channelInfos) { rootChannels.forEach((rc) => { 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) => { result.push(new Channel(sc.id, sc.properties.name)); });