Always use default item icon
This commit is contained in:
@@ -68,11 +68,6 @@ describe('getItemTypeIcon()', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('Should return undefined for undefined type', () => {
|
||||
expect(getItemTypeIcon(undefined, 'default'))
|
||||
.toBeUndefined();
|
||||
});
|
||||
|
||||
it('Should return the default icon for unknown type if provided', () => {
|
||||
expect(getItemTypeIcon('foobar', 'default'))
|
||||
.toBe('default');
|
||||
|
||||
@@ -136,8 +136,6 @@ export function getItemTypeIcon(itemType: BaseItemKind | string | undefined, def
|
||||
return 'photo';
|
||||
case BaseItemKind.PhotoAlbum:
|
||||
return 'photo_album';
|
||||
case undefined:
|
||||
return;
|
||||
default:
|
||||
return defaultIcon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user