We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09a13bd + 86e2afa commit 3b932b8Copy full SHA for 3b932b8
src/helpers/uptime.ts
@@ -16,14 +16,14 @@ const checkStatus = (url: string): Promise<void> =>
16
err => logger.error('Unable to access the health status api!', err)
17
);
18
19
-export const initUptime = (host: string): void => {
+export const initUptime = (host?: string): void => {
20
if (timerHandler) {
21
return;
22
}
23
24
logger.warn('Initializing the status handler');
25
startDate = new Date();
26
- const protocol = host.includes('localhost') ? 'http' : 'https';
+ const protocol = host && host.includes('localhost') ? 'http' : 'https';
27
const statusUrl = `${protocol}://${host}/status`;
28
checkStatus(statusUrl);
29
timerHandler = setInterval(() => {
0 commit comments