Skip to content

Commit

Permalink
use includes over indexOf
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Yesmunt committed Sep 19, 2019
1 parent 5987205 commit cde5434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/component/fileViewer/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cde5434

Please sign in to comment.