DEV Community

RJ Skhosana
RJ Skhosana

Posted on

Angular 9 Dev question(openshift in the mix)

Howzit everyone,
Got this piece of code that runs well on when launching the angular application locally from VS Code.. however the live project is hosted on Openshift container environment.

getBankerTeamType() {//debugger
let teamType = this.teamType?.toString();
if(typeof teamType !== 'undefined' && teamType){
teamType = teamType?.charAt(0).toUpperCase() +
teamType?.slice(1);
return teamType;
}
return;
}

So on the live environment I get this error:
ERROR TypeError: Cannot read properties of undefined (reading 'toString')
at e.getBankerTeamType

Any idea what the issue might be?

Top comments (0)