From 01d12cd5bb48016a2b0c83d6d61625d290ad351e Mon Sep 17 00:00:00 2001 From: ievavold <ievavold@wisc.edu> Date: Mon, 14 Jan 2019 13:03:35 -0600 Subject: [PATCH] add strict null and undefined checks --- src/app/shared/pipes/academic-year-state.pipe.ts | 2 +- tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/shared/pipes/academic-year-state.pipe.ts b/src/app/shared/pipes/academic-year-state.pipe.ts index 8fbd1fe..ae43459 100644 --- a/src/app/shared/pipes/academic-year-state.pipe.ts +++ b/src/app/shared/pipes/academic-year-state.pipe.ts @@ -6,7 +6,7 @@ import { Pipe, PipeTransform } from '@angular/core'; }) export class AcademicYearStatePipe implements PipeTransform { - terms = []; + terms = [] as string[]; constructor(private route: ActivatedRoute) { this.terms = route.snapshot.data.requiredData.terms.map(t => t.termCode); } diff --git a/tsconfig.json b/tsconfig.json index df4ef3e..ed67d49 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "strictNullChecks": true, "baseUrl": "./src", "importHelpers": true, "paths": { -- GitLab