From 43849052e1c721e58a84217307c88d9a1d2a68e6 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 2 Sep 2021 17:39:21 +0200 Subject: [PATCH] Fix: Set initial value Signed-off-by: Knut Ahlers --- twitchWatcher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twitchWatcher.go b/twitchWatcher.go index c1657d6..53ecb00 100644 --- a/twitchWatcher.go +++ b/twitchWatcher.go @@ -90,6 +90,10 @@ func (r *twitchWatcher) updateChannelFromAPI(channel string, sendUpdate bool) er return nil } + if r.ChannelStatus[channel] == nil { + r.ChannelStatus[channel] = &status + } + if r.ChannelStatus[channel].Category != status.Category { log.WithFields(log.Fields{ "channel": channel,