From a78440b8d2d3a594907b0f126be6d9b17dde1ab5 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Wed, 4 Dec 2019 13:49:14 +0700 Subject: [PATCH] DEBUG --- lib/smstools-config/queues-and-providers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/smstools-config/queues-and-providers.js b/lib/smstools-config/queues-and-providers.js index 5e3573c..d1847bf 100644 --- a/lib/smstools-config/queues-and-providers.js +++ b/lib/smstools-config/queues-and-providers.js @@ -71,11 +71,13 @@ exports.dump = async (mkdirIfQueueDirNotExists) => { configLines.push(line); hasQueues = true; - const hasPrefix = (!queue.prefix || !queue.prefix.length); + const hasPrefix = !(queue.prefix && queue.prefix.length); if (hasPrefix) { const providerLine = `${queue.name} = ${queue.prefix.join(', ')}`; providerLines.push(providerLine); hasProviders = true; + } else { + logger.verbose(`QUEUES-AND-PROVIDERS: DEBUG: ${queue.name} does not have prefix`); } } -- 1.9.0