Skip to content

Commit 8a3b8d5

Browse files
committed
🐛 Update Mutations Lollipop Tool Tip Info to await on promise before attempting to grab patient counts
1 parent 8511d3b commit 8a3b8d5

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

src/pages/resultsView/mutation/Mutations.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,20 @@ export default class Mutations extends React.Component<
334334
count: number,
335335
mutations: Mutation[],
336336
axisMode: AxisScale
337-
): JSX.Element {
338-
return (
339-
<LollipopTooltipCountInfo
340-
count={count}
341-
mutations={mutations}
342-
axisMode={axisMode}
343-
patientCount={this.props.store.filteredPatients.result!.length}
344-
/>
345-
);
337+
) {
338+
if (this.props.store.filteredPatients.isComplete) {
339+
return (
340+
<LollipopTooltipCountInfo
341+
count={count}
342+
mutations={mutations}
343+
axisMode={axisMode}
344+
patientCount={
345+
this.props.store.filteredPatients.result.length
346+
}
347+
/>
348+
);
349+
} else {
350+
return <></>;
351+
}
346352
}
347353
}

0 commit comments

Comments
 (0)