Disable fun error boundary toast in prod

This commit is contained in:
Jamie Kyle
2025-07-01 11:34:43 -07:00
committed by GitHub
parent 489efd1aec
commit 199dbaf49d

View File

@@ -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 (