diff --git a/frontend/src/composables/apis.ts b/frontend/src/composables/apis.ts index b5787804fe4..5c93dd5062e 100644 --- a/frontend/src/composables/apis.ts +++ b/frontend/src/composables/apis.ts @@ -210,9 +210,15 @@ function _sharedInternalLogic any>, K ex /** * TODO: Check why previous returns unknown by default without the type annotation */ - const cachedData = computed | undefined>((previous) => - loading.value || isNil(loading.value) ? previous : apiStore.getCachedRequest(`${String(unref(api)?.name)}.${String(unref(methodName))}`, stringArgs.value) - ); + const cachedData = computed | undefined>((previous) => { + const currentCachedRequest = apiStore.getCachedRequest(`${String(unref(api)?.name)}.${String(unref(methodName))}`, stringArgs.value); + + if ((loading.value || isNil(loading.value)) && !currentCachedRequest) { + return previous; + } + + return currentCachedRequest; + }); const isCached = computed(() => Boolean(cachedData.value)); const data = computed>(() => { if (ops.skipCache.request && result.value) { diff --git a/frontend/src/pages/library/[itemId].vue b/frontend/src/pages/library/[itemId].vue index 804c7c0b455..58c35282e81 100644 --- a/frontend/src/pages/library/[itemId].vue +++ b/frontend/src/pages/library/[itemId].vue @@ -9,8 +9,8 @@ -