mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
fixes: #32847 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> (cherry picked from commit 57dc5a14818a98f7afedcd43b47a5a6abaeffbd6)
This commit is contained in:
parent
67b16a099d
commit
c559a3e51b
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user