Skip to content

Commit

Permalink
[BI-750] fix TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeidlin authored and nickpalladino committed Jun 28, 2021
1 parent b249cc8 commit 54c1496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/breeding-insight/service/TrialService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class TrialService {

}

static async getById(programId: string, trialId: string): Promise<Result<Error, Trial>> {
static async getById(programId?: string, trialId?: string): Promise<Result<Error, Trial>> {
try {
if(!programId) throw new Error('missing or invalid program id');
if(!trialId) throw new Error('missing or invalid trial id');
Expand Down
4 changes: 2 additions & 2 deletions src/views/trials-and-studies/StudiesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
export default class StudiesList extends ProgramsBase {
private trial: Trial = new Trial();
private activeProgram?: Program;
private trialId: string | undefined = this.$route.params.trialId;
private trialId?: string = this.$route.params.trialId;
private title: string = 'All Studies';

mounted() {
Expand All @@ -60,7 +60,7 @@

async getTrial() {
try {
const response: Result<Error, Trial> = await TrialService.getById(this.activeProgram.id!, this.trialId!);
const response: Result<Error, Trial> = await TrialService.getById(this.activeProgram!.id, this.trialId!);
if(response.isErr()) throw response.value;
this.trial = response.value;
this.title = `Studies in ${this.trial.trialName}`;
Expand Down

0 comments on commit 54c1496

Please sign in to comment.