Commit a78440b8d2d3a594907b0f126be6d9b17dde1ab5

Authored by Adhidarma Hadiwinoto
1 parent 945185c59c
Exists in master

DEBUG

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

lib/smstools-config/queues-and-providers.js
... ... @@ -71,11 +71,13 @@ exports.dump = async (mkdirIfQueueDirNotExists) => {
71 71 configLines.push(line);
72 72 hasQueues = true;
73 73  
74   - const hasPrefix = (!queue.prefix || !queue.prefix.length);
  74 + const hasPrefix = !(queue.prefix && queue.prefix.length);
75 75 if (hasPrefix) {
76 76 const providerLine = `${queue.name} = ${queue.prefix.join(', ')}`;
77 77 providerLines.push(providerLine);
78 78 hasProviders = true;
  79 + } else {
  80 + logger.verbose(`QUEUES-AND-PROVIDERS: DEBUG: ${queue.name} does not have prefix`);
79 81 }
80 82 }
81 83