Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: fix error collapse default active key (#12967)

Inneid7bfd1b6c846
diff --git a/src/components/Error/index.tsx b/src/components/Error/index.tsx
index 18da79cf09d..24d8baabc51 100644
--- a/src/components/Error/index.tsx
+++ b/src/components/Error/index.tsx
@@ -15,6 +15,7 @@ interface ErrorCaptureProps {
const ErrorCapture = ({ error, reset }: ErrorCaptureProps) => {
const { t } = useTranslation('error');
const hasStack = !!error?.stack;
+ const defaultStackKeys = typeof __CI__ !== 'undefined' && __CI__ ? ['stack'] : [];
return (
<Flexbox align={'center'} justify={'center'} style={{ minHeight: '100%', width: '100%' }}>
@@ -38,7 +39,7 @@ const ErrorCapture = ({ error, reset }: ErrorCaptureProps) => {
<p style={{ marginBottom: '2em' }}>{t('error.desc')}</p>
{hasStack && (
<Collapse
- defaultActiveKey={__CI__ ? ['stack'] : []}
+ defaultActiveKey={defaultStackKeys}
expandIconPlacement={'end'}
size={'small'}
style={{ marginBottom: '1em', maxWidth: '90vw', width: 560 }}