Skip to content

Commit

Permalink
validate node exists to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Jul 25, 2024
1 parent 8a15bf8 commit a4ce646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/movies/MovieDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ sub itemContentChanged()
else
tomato = "pkg:/images/rotten.png"
end if
m.top.findNode("criticRatingIcon").uri = tomato
criticRatingIcon = m.top.findNode("criticRatingIcon")
if isValid(criticRatingIcon) then criticRatingIcon.uri = tomato
else
m.infoGroup.removeChild(m.top.findNode("criticRatingGroup"))
end if
Expand Down

0 comments on commit a4ce646

Please sign in to comment.