fix some issues with latest PRs (#5242)

This commit is contained in:
Prospector
2026-01-28 16:41:17 -08:00
committed by GitHub
parent 6d68c0983f
commit 3f8805b953
5 changed files with 32 additions and 13 deletions

View File

@@ -129,14 +129,23 @@ export { default as SlimPlayerModel } from './models/slim-player.gltf?url'
export const EmptyIllustration = _EmptyIllustration
export function getCategoryIcon(categoryName: string): IconComponent | undefined {
if (!categoryName) {
return undefined
}
return categoryIconMap[categoryName.toLowerCase()]
}
export function getLoaderIcon(loaderName: string): IconComponent | undefined {
if (!loaderName) {
return undefined
}
return loaderIconMap[loaderName.toLowerCase()]
}
// will try loader first, then category
export function getTagIcon(tagName: string): IconComponent | undefined {
if (!tagName) {
return undefined
}
return getLoaderIcon(tagName) ?? getCategoryIcon(tagName)
}