mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
simplify chained ifs
This commit is contained in:
@@ -63,11 +63,9 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) {
|
||||
useEffect(() => {
|
||||
if (hasMovies && mediaContainerRef.current) {
|
||||
mediaContainerRef.current.childNodes.forEach((node, index) => {
|
||||
if (index == mediaIndex) {
|
||||
if (node instanceof HTMLVideoElement) {
|
||||
node.play()
|
||||
currentVideoRef.current = node
|
||||
}
|
||||
if (index == mediaIndex && node instanceof HTMLVideoElement) {
|
||||
node.play()
|
||||
currentVideoRef.current = node
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user