mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
filter items by type only if there is type selected
This commit is contained in:
parent
5b22240220
commit
489d677ffc
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ const libraryItems = [
|
|||
|
||||
const useLibrary = (type, sort) => {
|
||||
const items = React.useMemo(() => {
|
||||
return libraryItems.filter(item => item.type === type);
|
||||
return libraryItems.filter(item => typeof type === 'string' && item.type === type);
|
||||
}, [type, sort]);
|
||||
const onSelect = React.useCallback((event) => {
|
||||
const { name, value } = event.currentTarget.dataset;
|
||||
|
|
|
|||
Loading…
Reference in a new issue