Skip to content

Commit 19906bc

Browse files
committed
easier to read code
1 parent a2f61f7 commit 19906bc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/shared/cf-env.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ class CfEnv {
3939
}
4040

4141
constructor(inputEnv = process.env) {
42-
const env = {
43-
...(inputEnv.NODE_ENV !== "production" && CfEnv.readDefaultEnv()),
44-
...inputEnv,
45-
};
42+
const env =
43+
inputEnv.NODE_ENV === "production"
44+
? inputEnv
45+
: {
46+
...CfEnv.readDefaultEnv(),
47+
...inputEnv,
48+
};
4649

4750
this.isOnCf = env[ENV.USER] === "vcap";
4851
this.cfApp = CfEnv.parseEnvVar(env, ENV.CF_APP) || {};

0 commit comments

Comments
 (0)