From 572cce8f775e1a633e8f3ff0d05ccb362832b8c6 Mon Sep 17 00:00:00 2001 From: Michael Cresswell Date: Mon, 28 Oct 2024 16:27:45 -0400 Subject: [PATCH] Make more robust with validation function and string template --- components/data/ChannelData.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/data/ChannelData.bs b/components/data/ChannelData.bs index f7080839e..3f5f3998b 100644 --- a/components/data/ChannelData.bs +++ b/components/data/ChannelData.bs @@ -5,8 +5,8 @@ import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json m.top.id = json.id - if json.number <> "" - m.top.title = json.number + " " + json.name + if isValid(json.number) + m.top.title = `CH ${json.number} ${json.name}` else m.top.title = json.name end if