refactor: make sure error is not thrown when null

This commit is contained in:
Timothy Z. 2024-05-13 16:24:55 +03:00
parent afde589963
commit a659e88cfa

View file

@ -533,7 +533,7 @@ const Player = ({ urlParams, queryParams }) => {
}
case 'KeyV': {
closeMenus();
if (player.metaItem !== null && player.metaItem.type === 'Ready' && player.metaItem.content.videos.length > 0) {
if (player.metaItem !== null && player.metaItem.type === 'Ready' && player.metaItem?.content?.videos?.length > 0) {
toggleVideosMenu();
}