From 501186cae60f9530066438c6244a8fa6d2c568c3 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 6 Dec 2025 21:35:23 +0200 Subject: [PATCH] clear when errorboundary catches --- src/view/com/util/ErrorBoundary.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx index 87e351f5e2..d087b6a36f 100644 --- a/src/view/com/util/ErrorBoundary.tsx +++ b/src/view/com/util/ErrorBoundary.tsx @@ -4,6 +4,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {logger} from '#/logger' +import {device} from '#/storage' import {ErrorScreen} from './error/ErrorScreen' import {CenteredView} from './Views' @@ -30,6 +31,9 @@ export class ErrorBoundary extends Component { public componentDidCatch(error: Error, errorInfo: ErrorInfo) { logger.error(error, {errorInfo}) + + // ensure the app doesn't re-open to the same screen, in case the screen is borked + device.remove(['navigationState']) } public render() {