use includes instead of some

This commit is contained in:
Puniko 2023-02-19 15:01:23 +01:00
parent eb6dbca9fd
commit 4de0b4e4ca

View file

@ -130,9 +130,7 @@ const previewable = (file: foundkey.entities.DriveFile): boolean => {
}; };
const isModule = (file: foundkey.entities.DriveFile): boolean => { const isModule = (file: foundkey.entities.DriveFile): boolean => {
return FILE_TYPE_TRACKER_MODULES.some((type) => { return FILE_TYPE_TRACKER_MODULES.includes(file.type) || FILE_EXT_TRACKER_MODULES.some((ext) => {
return file.type === type;
}) || FILE_EXT_TRACKER_MODULES.some((ext) => {
return file.name.toLowerCase().endsWith("." + ext); return file.name.toLowerCase().endsWith("." + ext);
}); });
}; };