mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
simplify chained ifs
This commit is contained in:
parent
86bca75b3f
commit
05c6c7c64d
1 changed files with 3 additions and 5 deletions
|
@ -63,11 +63,9 @@ export function GallerySlider({ gameDetails }: GallerySliderProps) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (hasMovies && mediaContainerRef.current) {
|
if (hasMovies && mediaContainerRef.current) {
|
||||||
mediaContainerRef.current.childNodes.forEach((node, index) => {
|
mediaContainerRef.current.childNodes.forEach((node, index) => {
|
||||||
if (index == mediaIndex) {
|
if (index == mediaIndex && node instanceof HTMLVideoElement) {
|
||||||
if (node instanceof HTMLVideoElement) {
|
node.play()
|
||||||
node.play()
|
currentVideoRef.current = node
|
||||||
currentVideoRef.current = node
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue