Add bounds check in highlightMostFrequentPath before array access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,10 +262,12 @@ clearAllHighlight() {
|
||||
},
|
||||
async highlightMostFrequentPath() {
|
||||
const LIST_INDEX = 0;
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].nodes.forEach(nodeToHighlight => {
|
||||
const traces = this.insightWithPath?.['most_freq_traces'];
|
||||
if (!traces?.[LIST_INDEX]) return;
|
||||
traces[LIST_INDEX].nodes.forEach(nodeToHighlight => {
|
||||
nodeToHighlight.data('nodeImageUrl', ImgCapsulesGlow[nodeToHighlight.data('level')]);
|
||||
});
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].edges.forEach(edgeToHighlight =>
|
||||
traces[LIST_INDEX].edges.forEach(edgeToHighlight =>
|
||||
edgeToHighlight.addClass('highlight-edge'));
|
||||
},
|
||||
setIsBPMNOn(isOn: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user