@hastehaul/common 2.0.31 → 2.0.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,9 +26,11 @@ function generateIdentifier(messageContent) {
26
26
  }
27
27
  exports.generateIdentifier = generateIdentifier;
28
28
  function getValueFromSettings(settings, key, envVar, defaultValue) {
29
- const setting = settings.find(item => item.key === key);
30
- if (setting)
31
- return setting.value;
29
+ if (settings.length > 0) {
30
+ const setting = settings.find(item => item.key === key);
31
+ if (setting)
32
+ return setting.value;
33
+ }
32
34
  return process.env[envVar] || defaultValue;
33
35
  }
34
36
  exports.getValueFromSettings = getValueFromSettings;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",