ZIN MIN
Aug 5, 2024

--

Thanks.

But there is a coding bug in the environment.service.ts file's line 15,

getValue(key: string, defaultValue?: any): any {

return this.environment[key] || defaultValue;

}

If this.environment[key] value is false (e.g for the key, production: false), function always will return default value because of JavaScript || checking.

It should be:

getValue(key: string, defaultValue?: any): any {

return this.environment[key] !== undefined ? this.environment[key] : defaultValue;

}

--

--

No responses yet