From e78ed5e163f7aba1400924cd9888492ef31ed1b5 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Tue, 28 Mar 2023 13:13:17 -0400 Subject: [PATCH] proper undefined check --- handlers/admin-get/ntfyStartup.js | 2 +- handlers/admin-get/ntfyStartup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/admin-get/ntfyStartup.js b/handlers/admin-get/ntfyStartup.js index 319c2716..d5082c0f 100644 --- a/handlers/admin-get/ntfyStartup.js +++ b/handlers/admin-get/ntfyStartup.js @@ -1,6 +1,6 @@ import * as configFunctions from '../../helpers/functions.config.js'; export function handler(_request, response) { - if (!configFunctions.getProperty('application.ntfyStartup')) { + if (configFunctions.getProperty('application.ntfyStartup') === undefined) { response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') + '/dashboard/?error=ntfyNotConfigured'); return; diff --git a/handlers/admin-get/ntfyStartup.ts b/handlers/admin-get/ntfyStartup.ts index 27833381..3146bf24 100644 --- a/handlers/admin-get/ntfyStartup.ts +++ b/handlers/admin-get/ntfyStartup.ts @@ -3,7 +3,7 @@ import type { Request, Response } from 'express' import * as configFunctions from '../../helpers/functions.config.js' export function handler(_request: Request, response: Response): void { - if (!configFunctions.getProperty('application.ntfyStartup')) { + if (configFunctions.getProperty('application.ntfyStartup') === undefined) { response.redirect( configFunctions.getProperty('reverseProxy.urlPrefix') + '/dashboard/?error=ntfyNotConfigured'