Skip to content

Commit 14976f0

Browse files
Updated Related Integrations to support Strings
1 parent d67a879 commit 14976f0

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/pages/rules/[id].tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,19 @@ export default function RuleDetails({
197197
},
198198
{
199199
title: 'Related Integrations',
200-
description:
201-
rule.metadata.integration &&
202-
rule.metadata.integration.map((x, i) => (
203-
<p key={i}>
204-
<EuiLink
205-
target="_blank"
206-
href={`https://docs.elastic.co/en/integrations/${x}`}>
207-
{x}
208-
</EuiLink>
209-
</p>
210-
)),
200+
description: [
201+
...(Array.isArray(rule.metadata.integration)
202+
? rule.metadata.integration
203+
: [rule.metadata.integration]),
204+
].map((x, i) => (
205+
<p key={i}>
206+
<EuiLink
207+
target="_blank"
208+
href={`https://docs.elastic.co/en/integrations/${x}`}>
209+
{x}
210+
</EuiLink>
211+
</p>
212+
)),
211213
},
212214
{
213215
title: 'Query',

0 commit comments

Comments
 (0)