Skip to content

Commit

Permalink
Merge pull request #1844 from cewert/fix-episode-data-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Jul 21, 2024
2 parents 4d1ea1a + f5e765b commit d93e289
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/data/TVEpisodeData.bs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import "pkg:/source/utils/misc.bs"

sub setFields()
if not isValid(m.top.json) then return
datum = m.top.json

m.top.id = datum.id
Expand All @@ -10,7 +13,7 @@ sub setFields()
end sub

sub setPoster()
if m.top.image <> invalid
if isValid(m.top.image)
m.top.posterURL = m.top.image.url
else
m.top.posterURL = ""
Expand Down

0 comments on commit d93e289

Please sign in to comment.