added null case for retrieving build message
This commit is contained in:
parent
b4e79206a0
commit
068ac0f19e
2 changed files with 7 additions and 2 deletions
|
@ -14,6 +14,10 @@ export class BuildServiceImpl implements BuildService {
|
|||
public getBuildMessage(phase: string): string {
|
||||
var message: string;
|
||||
switch (phase) {
|
||||
case null:
|
||||
message = '';
|
||||
break;
|
||||
|
||||
case 'cannot_load':
|
||||
message = 'Cannot load build status';
|
||||
break;
|
||||
|
@ -76,7 +80,7 @@ export class BuildServiceImpl implements BuildService {
|
|||
break;
|
||||
|
||||
default:
|
||||
throw new Error("Invalid build phase");
|
||||
throw new Error(`Invalid build phase: ${phase.toString()}`);
|
||||
}
|
||||
|
||||
return message;
|
||||
|
|
Reference in a new issue