diff --git a/src/components/ConnectionRequired.tsx b/src/components/ConnectionRequired.tsx index 1d127e2e89..7ec089af50 100644 --- a/src/components/ConnectionRequired.tsx +++ b/src/components/ConnectionRequired.tsx @@ -96,7 +96,7 @@ const ConnectionRequired: FunctionComponent = ({ throw new Error('Public system info request failed'); } const systemInfo = await infoResponse.json(); - if (!systemInfo.StartupWizardCompleted) { + if (!systemInfo?.StartupWizardCompleted) { // Bounce to the wizard console.info('[ConnectionRequired] startup wizard is not complete, redirecting there'); navigate(BounceRoutes.StartWizard); @@ -104,6 +104,7 @@ const ConnectionRequired: FunctionComponent = ({ } } catch (ex) { console.error('[ConnectionRequired] checking wizard status failed', ex); + return; } } @@ -112,7 +113,8 @@ const ConnectionRequired: FunctionComponent = ({ return; } - // TODO: should exiting the app be handled here? + // TODO: appRouter will call appHost.exit() if navigating back when you are already at the default route. + // This case will need to be handled elsewhere before appRouter can be killed. const client = ServerConnections.currentApiClient(); diff --git a/src/components/HistoryRouter.tsx b/src/components/HistoryRouter.tsx index 68577dc1d5..21e1efe0fe 100644 --- a/src/components/HistoryRouter.tsx +++ b/src/components/HistoryRouter.tsx @@ -13,7 +13,7 @@ const normalizePath = (pathname: string) => pathname.replace(/^!/, ''); * Refs: https://github.com/remix-run/react-router/blob/v6.3.0/packages/react-router-dom/index.tsx#L222 */ export function HistoryRouter({ basename, children, history }: HistoryRouterProps) { - const [state, setState] = React.useState({ + const [state, setState] = React.useState({ action: history.action, location: history.location });