Merge pull request #1199 from Stremio/fix/statistics-menu-handler
Some checks are pending
Build / build (push) Waiting to run

Player: Fix statistics menu shortcut handler
This commit is contained in:
Timothy Z. 2026-04-20 12:20:55 +03:00 committed by GitHub
commit 5bc74a9da4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -735,7 +735,7 @@ const Player = ({ urlParams, queryParams }) => {
onShortcut('statisticsMenu', () => {
closeMenus();
const stream = player.selected?.stream;
if (streamingServer?.statistics?.type !== 'Err' && typeof stream === 'string' && typeof stream === 'number') {
if (streamingServer?.statistics?.type !== 'Err' && typeof stream?.infoHash === 'string' && typeof stream?.fileIdx === 'number') {
toggleStatisticsMenu();
}
}, [player.selected, streamingServer.statistics, toggleStatisticsMenu]);