fix cloudflare r2 adapter range requests

This commit is contained in:
dswbx
2025-07-02 14:07:26 +02:00
parent 4e10b36d0d
commit d1378c6c51
5 changed files with 31 additions and 14 deletions

View File

@@ -124,7 +124,8 @@ const Icons = {
};
const AdapterIcon = ({ type }: { type: string }) => {
const Icon = Icons[type];
// find icon whose name starts with type
const Icon = Object.entries(Icons).find(([key]) => type.startsWith(key))?.[1];
if (!Icon) return null;
return <Icon />;
};