Skip to content

Commit

Permalink
Hot fix to properly await samples in gene panel calls
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman committed Feb 10, 2020
1 parent 97f5e56 commit 4bef711
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ import { getVariantAlleleFrequency } from '../../../shared/lib/MutationUtils';
import { AppStore, SiteError } from 'AppStore';
import { getGeneFilterDefault } from './PatientViewPageStoreUtil';
import { checkNonProfiledGenesExist } from '../PatientViewPageUtils';
import { sleep } from 'shared/lib/TimeUtils';

type PageMode = 'patient' | 'sample';

Expand Down Expand Up @@ -350,12 +351,13 @@ export class PatientViewPageStore {

readonly samples = remoteData(
{
invoke: () =>
fetchSamplesForPatient(
invoke: () => {
return fetchSamplesForPatient(
this.studyId,
this._patientId,
this.sampleId
),
);
},
onError: (err: Error) => {
this.appStore.siteErrors.push({
errorObj: err,
Expand Down Expand Up @@ -1112,7 +1114,7 @@ export class PatientViewPageStore {
[sampleId: string]: GenePanelData;
}>(
{
await: () => [this.mutationMolecularProfileId],
await: () => [this.mutationMolecularProfileId, this.samples],
invoke: async () => {
if (this.mutationMolecularProfileId.result) {
return fetchGenePanelData(
Expand Down Expand Up @@ -1145,7 +1147,7 @@ export class PatientViewPageStore {
[sampleId: string]: GenePanelData;
}>(
{
await: () => [this.molecularProfileIdDiscrete],
await: () => [this.molecularProfileIdDiscrete, this.samples],
invoke: async () => {
if (this.molecularProfileIdDiscrete.result) {
return fetchGenePanelData(
Expand Down

0 comments on commit 4bef711

Please sign in to comment.