explicit undefined checks

deepsource-autofix-76c6eb20
Dan Gowans 2023-03-28 11:29:40 -04:00
parent e955e5b43e
commit 9f18bd3328
2 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ cluster.on('exit', (worker, code, signal) => {
cluster.fork();
});
const ntfyStartupConfig = configFunctions.getProperty('application.ntfyStartup');
if (ntfyStartupConfig) {
if (ntfyStartupConfig !== undefined) {
const topic = ntfyStartupConfig.topic;
const server = ntfyStartupConfig.server;
const ntfyStartupMessage = {
@ -55,7 +55,7 @@ if (ntfyStartupConfig) {
message: 'Application Shut Down',
tags: ['arrow_down']
};
if (server) {
if (server !== undefined) {
ntfyStartupMessage.server = server;
ntfyShutdownMessage.server = server;
}

View File

@ -67,7 +67,7 @@ cluster.on('exit', (worker, code, signal) => {
const ntfyStartupConfig = configFunctions.getProperty('application.ntfyStartup')
if (ntfyStartupConfig) {
if (ntfyStartupConfig !== undefined) {
const topic = ntfyStartupConfig.topic
const server = ntfyStartupConfig.server
@ -85,7 +85,7 @@ if (ntfyStartupConfig) {
tags: ['arrow_down']
}
if (server) {
if (server !== undefined) {
ntfyStartupMessage.server = server
ntfyShutdownMessage.server = server
}