Skip to content

Commit eb1999a

Browse files
committed
Update StatusIcons.tsx
1 parent e3ffaea commit eb1999a

File tree

1 file changed

+3
-2
lines changed
  • src/main/frontend/pipeline-graph-view/pipeline-graph/main/support

1 file changed

+3
-2
lines changed

src/main/frontend/pipeline-graph-view/pipeline-graph/main/support/StatusIcons.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,14 @@ export function getSymbolForResult(
9292
// Map the result to retrieve the appropriate symbol from core
9393
const symbols = document.querySelector<HTMLTemplateElement>(
9494
"#pgv-build-status-icons",
95-
)!;
95+
);
9696
const mappedResult = mapResultToCore(result);
9797

9898
return (
9999
<div
100100
dangerouslySetInnerHTML={{
101-
__html: symbols.content.querySelector("#" + mappedResult)!.outerHTML,
101+
// This fails in React tests without the Jelly context
102+
__html: symbols?.content?.querySelector("#" + mappedResult)?.outerHTML || `<div></div>`,
102103
}}
103104
/>
104105
);

0 commit comments

Comments
 (0)