mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
Fix invalid request for all items on page load
This commit is contained in:
@@ -187,14 +187,14 @@ export const useGetQueryFiltersLegacy = (
|
||||
|
||||
const fetchGetItemsViewByType = async (
|
||||
currentApi: JellyfinApiContext,
|
||||
viewType: LibraryTab,
|
||||
viewType: LibraryTab | undefined,
|
||||
parentId: ParentId,
|
||||
itemType: BaseItemKind[],
|
||||
libraryViewSettings: LibraryViewSettings,
|
||||
options?: AxiosRequestConfig
|
||||
) => {
|
||||
const { api, user } = currentApi;
|
||||
if (api && user?.Id) {
|
||||
if (api && user?.Id && viewType) {
|
||||
const isFavorite = libraryViewSettings.Filters?.Status?.includes(ItemFilter.IsFavorite) || undefined;
|
||||
let response;
|
||||
switch (viewType) {
|
||||
@@ -380,7 +380,7 @@ export const useGetItemsViewByType = (
|
||||
queryFn: ({ signal }) =>
|
||||
fetchGetItemsViewByType(
|
||||
currentApi,
|
||||
viewType!,
|
||||
viewType,
|
||||
parentId,
|
||||
itemType,
|
||||
libraryViewSettings!,
|
||||
|
||||
Reference in New Issue
Block a user