diff --git a/static/js/services/build/build.service.impl.spec.ts b/static/js/services/build/build.service.impl.spec.ts index 7fd08cd2d..a2e748206 100644 --- a/static/js/services/build/build.service.impl.spec.ts +++ b/static/js/services/build/build.service.impl.spec.ts @@ -33,10 +33,11 @@ describe("BuildServiceImpl", () => { }); describe("getBuildMessage", () => { - var buildMessages: {phase: string, message: string}[]; + var buildMessages: {phase?: string, message: string}[]; beforeEach(() => { buildMessages = [ + {message: ""}, {phase: null, message: ""}, {phase: 'cannot_load', message: 'Cannot load build status'}, {phase: 'starting', message: 'Starting Dockerfile build'}, diff --git a/static/js/services/build/build.service.impl.ts b/static/js/services/build/build.service.impl.ts index a65fb6a56..53cca4901 100644 --- a/static/js/services/build/build.service.impl.ts +++ b/static/js/services/build/build.service.impl.ts @@ -15,6 +15,7 @@ export class BuildServiceImpl implements BuildService { var message: string; switch (phase) { case null: + case undefined: message = ''; break;