components_data_TVEpisodeData.bs
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
@@ -12,7 +15,7 @@
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 = ""
diff --git a/docs/api/source_Main.bs.html b/docs/api/source_Main.bs.html
index dae57ac9c..3e36d1639 100644
--- a/docs/api/source_Main.bs.html
+++ b/docs/api/source_Main.bs.html
@@ -234,7 +234,7 @@
end if
seasonMetaData = ItemMetaData(currentScene.seasonData.id)
- currentScene.seasonData = seasonMetaData.json
+ if isValid(seasonMetaData) then currentScene.seasonData = seasonMetaData.json
currentScene.episodeObjects = currentScene.objects
currentScene.callFunc("updateSeason")
end if