diff --git a/src/features/MatchPage/hooks/useVideoData.tsx b/src/features/MatchPage/hooks/useVideoData.tsx index c8e2c2e5..f1da2696 100644 --- a/src/features/MatchPage/hooks/useVideoData.tsx +++ b/src/features/MatchPage/hooks/useVideoData.tsx @@ -1,10 +1,12 @@ import { useEffect, useState } from 'react' +import isNull from 'lodash/isNull' +import isEmpty from 'lodash/isEmpty' + import type { LiveVideos, Videos } from 'requests' import { getLiveVideos, getVideos } from 'requests' import { useSportNameParam, usePageId } from 'hooks' -import { isNull } from 'lodash' import { useLastPlayPosition } from './useLastPlayPosition' @@ -17,7 +19,7 @@ export const useVideoData = () => { useEffect(() => { const requestVideos = async () => { const live = await getLiveVideos(sportType, matchId) - if (isNull(live)) { + if (isNull(live) || isEmpty(live)) { const videosResponse = await getVideos(sportType, matchId) setVideos(videosResponse) } else {