-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plots tab related data loading on initial study view load #4958
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cbioportalfrontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -3750,7 +3754,7 @@ export default class PlotsTab extends React.Component<IPlotsTabProps, {}> { | |||
options = options.filter(stringCompare).slice(0, 10); | |||
const genes = await fetchGenes(options.map(o => o.label)); | |||
const coverageInformationPromise = getCoverageInformation( | |||
this.props.genePanelDataForAllProfiles!, | |||
this.props.genePanelDataForAllProfiles?.result || [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make sure that we're awaiting result properly and then use ! to assert it isntead of ?. in other words, using ? implies that we aren't sure it's loaded yet, and we should be sure.
this.props.hugoGeneSymbols, | ||
Array.isArray(this.props.hugoGeneSymbols) | ||
? this.props.hugoGeneSymbols | ||
: this.props.hugoGeneSymbols.result, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems strange. i guess this is due to fact that it's used differently in different places. but there should be a better way to handle this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets see if there's a nicer way to handle some of the conditionality here.
Fix cBioPortal/cbioportal#10897