-
Notifications
You must be signed in to change notification settings - Fork 258
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
Selected genes list populates when there is only one group selected #4551
Conversation
(this.alterationsEnrichmentDataRequestGroups.result && | ||
this.alterationsEnrichmentDataRequestGroups.result.length > |
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.
Maybe simplify it this way?
(this.alterationsEnrichmentDataRequestGroups.result && | |
this.alterationsEnrichmentDataRequestGroups.result.length > | |
this.alterationsEnrichmentDataRequestGroups.result?.length |
Technically, we don't even need the check > 0
.
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.
Personally I prefer to have the > 0 since it's more explicit, but I'm happy to change it if you want me to.
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.
We can keep the > 0
. I don't have a strong preference.
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.
Ah, just realized if we keep the > 0
then the above simplification doesn't work. TypeScript complains if we do
this.alterationsEnrichmentDataRequestGroups.result?.length > 0
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.
Sorry for dragging this out but if we really want to be explicit we can also do this:
!_.isEmpty(this.alterationsEnrichmentDataRequestGroups.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.
No worries I can do that
Fix cBioPortal/cbioportal#10088
Describe changes proposed in this pull request:
Why no test?
This is a network request based issue so it'll be difficult to create a non-brittle test
Checks
@alisman @onursumer