mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Refactor queries to use non-null assert
This commit is contained in:
parent
3df39d659c
commit
2ce9e9f1e0
28 changed files with 47 additions and 127 deletions
|
@ -17,8 +17,8 @@ async function mirrorIfEnabled(serverId: string, itemId: string) {
|
|||
try {
|
||||
const item = await queryClient.fetchQuery(getItemQuery(
|
||||
api,
|
||||
userId,
|
||||
itemId));
|
||||
itemId,
|
||||
userId));
|
||||
|
||||
playbackManager.displayContent({
|
||||
ItemName: item.Name,
|
||||
|
|
|
@ -142,7 +142,7 @@ class AppRouter {
|
|||
const userId = apiClient.getCurrentUserId();
|
||||
|
||||
queryClient
|
||||
.fetchQuery(getItemQuery(api, userId, item))
|
||||
.fetchQuery(getItemQuery(api, item, userId))
|
||||
.then(itemObject => {
|
||||
this.showItem(itemObject, options);
|
||||
})
|
||||
|
|
|
@ -84,8 +84,9 @@ async function loadThemeMedia(serverId, itemId) {
|
|||
try {
|
||||
const item = await queryClient.fetchQuery(getItemQuery(
|
||||
api,
|
||||
userId,
|
||||
itemId));
|
||||
itemId,
|
||||
userId
|
||||
));
|
||||
|
||||
if (item.CollectionType) {
|
||||
stopIfPlaying();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue