Fix manga details not updating after refresh with partial data
Regression 0ed2e7c193
This commit is contained in:
@@ -19,14 +19,22 @@ export const useRefreshManga = (mangaId: string) => {
|
||||
setFetchingOnline(true);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
await requestManager.refreshManga(mangaId, { awaitRefetchQueries: true }).response;
|
||||
} catch (e) {
|
||||
const handleError = (e: unknown) => {
|
||||
if (CombinedGraphQLErrors.is(e) && baseCleanup(e.message) === 'no chapters found') {
|
||||
return;
|
||||
}
|
||||
|
||||
setError(e);
|
||||
};
|
||||
|
||||
try {
|
||||
const { error: tmpError } = await requestManager.refreshManga(mangaId, {
|
||||
awaitRefetchQueries: true,
|
||||
}).response;
|
||||
|
||||
handleError(tmpError);
|
||||
} catch (e) {
|
||||
handleError(e);
|
||||
} finally {
|
||||
setFetchingOnline(false);
|
||||
}
|
||||
|
||||
@@ -700,8 +700,9 @@ export class MigrationManager {
|
||||
|
||||
return (async () => {
|
||||
try {
|
||||
const updatedMatch = await requestManager.refreshManga(match.id, { awaitRefetchQueries: true })
|
||||
.response;
|
||||
const updatedMatch = await requestManager.refreshManga(match.id, {
|
||||
awaitRefetchQueries: true,
|
||||
}).response;
|
||||
|
||||
return updatedMatch.data?.fetchManga?.manga ?? match;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user