From d625070d6db3e8245d0ef57fa0ffcc74d6a52336 Mon Sep 17 00:00:00 2001 From: Branden Rodgers Date: Wed, 18 Dec 2024 15:43:11 -0500 Subject: [PATCH] return null instead of false --- lib/validation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/validation.ts b/lib/validation.ts index 300aa85a8..8d56e4c8b 100644 --- a/lib/validation.ts +++ b/lib/validation.ts @@ -201,9 +201,9 @@ export function fileExists(_path: string): boolean { return true; } -export function checkAndConvertToJson(_path: string): object | boolean | null { +export function checkAndConvertToJson(_path: string): object | null { const filePath = getAbsoluteFilePath(_path); - if (!fileExists(filePath)) return false; + if (!fileExists(filePath)) return null; if (getExt(_path) !== 'json') { logger.error(`The file "${_path}" must be a valid JSON file`);