redundant checks for the type of stream removed

This commit is contained in:
nklhrstv 2020-04-01 17:12:15 +03:00
parent cdd1eac725
commit 63ac8b1453

View file

@ -264,7 +264,7 @@ const Player = ({ urlParams }) => {
}
}, [videoState.subtitlesTracks]);
React.useEffect(() => {
if (typeof stream !== 'object' || stream === null) {
if (stream === null) {
closeInfoMenu();
}
}, [stream]);
@ -326,7 +326,7 @@ const Player = ({ urlParams }) => {
}
case 'KeyM': {
closeSubtitlesMenu();
if (typeof stream === 'object' && stream !== null) {
if (stream !== null) {
toggleInfoMenu();
}