From ca558343154951220c0b70a6daf8eb689f21ede8 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 24 May 2021 21:53:17 +0200 Subject: [PATCH] Fix: Display fallback when no category is set Signed-off-by: Knut Ahlers --- functions_twitch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions_twitch.go b/functions_twitch.go index e4e157f..f5e3419 100644 --- a/functions_twitch.go +++ b/functions_twitch.go @@ -16,7 +16,7 @@ func init() { tplFuncs.Register("recentGame", genericTemplateFunctionGetter(func(username string, v ...string) (string, error) { game, _, err := twitch.GetRecentStreamInfo(strings.TrimLeft(username, "#")) - if err != nil && len(v) > 0 { + if len(v) > 0 && (err != nil || game == "") { return v[0], nil }