validate we have data from api to prevent crash

This commit is contained in:
Charles Ewert 2024-10-01 19:48:31 -04:00
parent d7c99f508f
commit 3002ce0a59

View File

@ -4,9 +4,12 @@ import "pkg:/source/utils/config.bs"
sub setFields()
json = m.top.json
m.top.Type = "Person"
if json = invalid then return
m.top.id = json.id
m.top.favorite = json.UserData.isFavorite
m.top.Type = "Person"
setPoster()
end sub