replace filter with some

This commit is contained in:
Puniko 2022-12-29 00:08:19 +01:00
parent bffd15daed
commit 9302a9faaa

View file

@ -130,9 +130,9 @@ const previewable = (file: foundkey.entities.DriveFile): boolean => {
}; };
const isModule = (file: foundkey.entities.DriveFile): boolean => { const isModule = (file: foundkey.entities.DriveFile): boolean => {
return FILE_EXT_TRACKER_MODULES.filter((ext) => { return FILE_EXT_TRACKER_MODULES.some((ext) => {
return file.name.toLowerCase().endsWith("." + ext); return file.name.toLowerCase().endsWith("." + ext);
}).length > 0; });
}; };
</script> </script>