Fix for view switcher default icon display (#7029)

Fixes #6947 (View switcher default icon display)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Vinod Rathod
2024-10-10 13:42:17 +05:30
committed by GitHub
parent b6b7d0e665
commit 97ab0481e4
3 changed files with 19 additions and 4 deletions

View File

@ -12,7 +12,10 @@ export const useIcons = () => {
};
const getIcon = (iconKey?: string | null) => {
if (!iconKey) return defaultIcon;
if (!iconKey) {
return defaultIcon;
}
return icons[iconKey] ?? defaultIcon;
};