Get rid of optional chaining (Roku 11 feature)

This commit is contained in:
Brahim Hadriche committed 2023-10-29 11:38:36 -04:00
1 parent af1fa0b401
commit 6cf735e089
3 files changed
+35 -14

No files matched your search

@@ -185,8 +185,8 @@ function OnVideoPlayerStateChange() as void
end if
if state = "finished"
metadata = content?.metadata
if not PlayNext(metadata?.recommendedVideos)
metadata = content.metadata
if metadata <> invalid and not PlayNext(metadata.recommendedVideos)
m.container@.watchedVideosClear(invalid)
VideoUtils.CloseVideo()
end if
@@ -231,7 +231,10 @@ function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
end if
for each metadata in recommendedVideos
videoId = metadata?.videoId
if metadata = invalid
continue for
end if
videoId = metadata.videoId
if videoId = invalid
continue for
end if