Skip to content

Commit 3a0522d

Browse files
fix: parse number and boolean env vars
1 parent 7332b60 commit 3a0522d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

config/custom-environment-variables.cjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ function mapEnvConfig (object, prefix = '') {
77
return mapEnvConfig(value, (prefix ? `${prefix}_` : '') + _.snakeCase(key).toUpperCase());
88
}
99

10-
return (prefix ? `${prefix}_` : '') + _.snakeCase(key).toUpperCase();
10+
return {
11+
__name: (prefix ? `${prefix}_` : '') + _.snakeCase(key).toUpperCase(),
12+
...(typeof value === 'number' && { __format: 'number' }),
13+
...(typeof value === 'boolean' && { __format: 'boolean' }),
14+
};
1115
});
1216
}
1317

src/lib/ws/helper/reconnect-probes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const disconnectProbes = async () => {
1616
};
1717

1818
export const reconnectProbes = () => {
19-
if (!reconnectProbesDelay || (reconnectProbesDelay as unknown as string) === '0') {
19+
if (!reconnectProbesDelay) {
2020
return;
2121
}
2222

0 commit comments

Comments
 (0)