Skip to content

Commit f453208

Browse files
committed
fix test whoops
1 parent 20b7019 commit f453208

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

x-pack/plugins/siem/public/pages/case/components/case_view/index.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ describe('CaseView ', () => {
7070

7171
const defaultUseGetCaseUserActions = {
7272
caseUserActions,
73+
caseServices: {},
7374
fetchCaseUserActions,
7475
firstIndexPushToService: -1,
7576
hasDataToPush: false,

x-pack/plugins/siem/public/pages/case/components/case_view/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,13 @@ export const CaseComponent = React.memo<CaseProps>(
165165
[connectors, caseData.connectorId]
166166
);
167167

168-
const currentExternalIncident = useMemo(() => {
169-
return caseServices[caseData.connectorId];
170-
}, [caseServices, caseData.connectorId]);
168+
const currentExternalIncident = useMemo(
169+
() =>
170+
caseServices != null && caseServices[caseData.connectorId] != null
171+
? caseServices[caseData.connectorId]
172+
: null,
173+
[caseServices, caseData.connectorId]
174+
);
171175

172176
const { pushButton, pushCallouts } = usePushToService({
173177
caseConnectorId: caseData.connectorId,

0 commit comments

Comments
 (0)