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(() => {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue