From b182d9930e4694b3bf5b3b4eaa923d4a96f8e0b8 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Tue, 10 Sep 2024 06:11:00 +0000 Subject: [PATCH] Use ?? over typeof --- lib/config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/config.js b/lib/config.js index 0c9b5a6..901b81f 100644 --- a/lib/config.js +++ b/lib/config.js @@ -10,11 +10,10 @@ export const loadConfig = async (configPath) => { ) } - if (typeof config.checksumPrefix === 'undefined') { - config.checksumPrefix = 'benthos' + return { + ...config, + checksumPrefix: config.checksumPrefix ?? 'benthos' } - - return config } export const loadJson = async (name) => {