mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-06 06:49:53 -06:00
fixes: #32847
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
(cherry picked from commit 57dc5a1481)
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
|
||||
export interface ErrorBoundaryContextValue {
|
||||
error?: Error;
|
||||
showBoundary: (error: Error) => void;
|
||||
showBoundary: (error?: Error) => void;
|
||||
}
|
||||
|
||||
const ErrorBoundaryContext = createNamedContext<
|
||||
@@ -42,7 +42,7 @@ export class ErrorBoundaryProvider extends Component<
|
||||
return { error };
|
||||
};
|
||||
|
||||
showBoundary = (error: Error) => {
|
||||
showBoundary = (error?: Error) => {
|
||||
this.setState({ error });
|
||||
};
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ export function useFetch<T>(
|
||||
useEffect(() => {
|
||||
const controller = new AbortController();
|
||||
const { signal } = controller;
|
||||
showBoundary();
|
||||
adminClientCall()
|
||||
.then((result) => {
|
||||
if (!signal.aborted) {
|
||||
|
||||
Reference in New Issue
Block a user