diff --git a/src/App/DeepLinkHandler.js b/src/App/DeepLinkHandler.js index bce58c0fd..34defbf17 100644 --- a/src/App/DeepLinkHandler.js +++ b/src/App/DeepLinkHandler.js @@ -4,10 +4,13 @@ const { withCoreSuspender, useStreamingServer } = require('stremio/common'); const DeepLinkHandler = () => { const streamingServer = useStreamingServer(); React.useEffect(() => { - if (streamingServer.torrent && streamingServer.torrent[1].type === 'Ready') { - const [_, deepLinks] = streamingServer.torrent[1].content; - if (typeof deepLinks.metaDetailsVideos === 'string') { - window.location = deepLinks.metaDetailsVideos; + if (streamingServer.torrent !== null) { + const [, { type, content }] = streamingServer.torrent; + if (type === 'Ready') { + const [, deepLinks] = content; + if (typeof deepLinks.metaDetailsVideos === 'string') { + window.location = deepLinks.metaDetailsVideos; + } } } }, [streamingServer.torrent]);