refactor to remove else clause

This commit is contained in:
Charles Ewert 2023-11-19 22:04:17 -05:00
parent 388bd0a371
commit 491ef43fd5

View File

@ -48,13 +48,13 @@ end sub
' get the currently focused item
function getFocusedItem() as dynamic
if isValid(m.top.focusedChild) and isValid(m.top.focusedChild.focusedChild)
if not isValid(m.top.focusedChild) or not isValid(m.top.focusedChild.focusedChild)
return invalid
end if
focusedChild = m.top.focusedChild.focusedChild
if not isValid(focusedChild.content) then return invalid
m.top.lastFocus = focusedChild
else
return invalid
end if
if isValidAndNotEmpty(focusedChild.rowItemFocused)
itemToPlay = focusedChild.content.getChild(focusedChild.rowItemFocused[0]).getChild(0)