use includes over indexOf

This commit is contained in:
Sean Yesmunt 2019-09-19 13:06:34 -04:00
parent 59872056eb
commit cde543499c

View file

@ -115,7 +115,7 @@ export default function FileViewer(props: Props) {
}
const hidePlayer =
!isPlaying || !uri || (!inline && (!floatingPlayerEnabled || ['audio', 'video'].indexOf(mediaType) === -1));
!isPlaying || !uri || (!inline && (!floatingPlayerEnabled || ['audio', 'video'].includes(mediaType)));
if (hidePlayer) {
return null;