From 199dbaf49daaa6850e1b3fe8effee03131a533e6 Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:34:43 -0700 Subject: [PATCH] Disable fun error boundary toast in prod --- ts/components/fun/base/FunErrorBoundary.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/components/fun/base/FunErrorBoundary.tsx b/ts/components/fun/base/FunErrorBoundary.tsx index 6f57e653eb0..b37e095b66b 100644 --- a/ts/components/fun/base/FunErrorBoundary.tsx +++ b/ts/components/fun/base/FunErrorBoundary.tsx @@ -5,6 +5,7 @@ import React, { Component, useCallback } from 'react'; import { createLogger } from '../../../logging/log'; import * as Errors from '../../../types/errors'; import { ToastType } from '../../../types/Toast'; +import { isProduction } from '../../../util/version'; const log = createLogger('FunErrorBoundary'); @@ -55,7 +56,9 @@ export function FunErrorBoundary(props: FunErrorBoundaryProps): JSX.Element { info.componentStack ); - window.reduxActions?.toast.showToast({ toastType: ToastType.Error }); + if (!isProduction(window.getVersion())) { + window.reduxActions?.toast.showToast({ toastType: ToastType.Error }); + } }, []); return (