mirror of https://github.com/fantasticit/think.git
client: catch error
This commit is contained in:
parent
86755013b4
commit
cd071ccae1
|
@ -14,6 +14,7 @@ export async function serverPrefetcher(ctx: NextPageContext, actions: PrefetchAc
|
|||
return {};
|
||||
}
|
||||
|
||||
try {
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
await Promise.all(
|
||||
|
@ -25,4 +26,7 @@ export async function serverPrefetcher(ctx: NextPageContext, actions: PrefetchAc
|
|||
return {
|
||||
dehydratedState: dehydrate(queryClient),
|
||||
};
|
||||
} catch (err) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue