diff --git a/src/components/shared/SampleTooltipContents.js b/src/components/shared/SampleTooltipContents.js index 7ee27fb00a..3b79b92e19 100644 --- a/src/components/shared/SampleTooltipContents.js +++ b/src/components/shared/SampleTooltipContents.js @@ -136,8 +136,9 @@ export class SampleTooltipContents extends React.PureComponent { const sampleTime = samples.time[sampleIndex]; const stackIndex = samples.stack[sampleIndex]; const hasSamples = samples.length > 0 && stackTable.length > 1; + const hasValidStackIndex = (stackIndex !== null) || (stackIndex !== undefined); - if (hasSamples) { + if (hasSamples && hasValidStackIndex) { const stack = getFuncNamesAndOriginsForPath( convertStackToCallNodeAndCategoryPath( rangeFilteredThread,