@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.
- package/build/utils/utils.js +5 -3
- package/package.json +1 -1
package/build/utils/utils.js
CHANGED
@@ -26,9 +26,11 @@ function generateIdentifier(messageContent) {
|
|
26
26
|
}
|
27
27
|
exports.generateIdentifier = generateIdentifier;
|
28
28
|
function getValueFromSettings(settings, key, envVar, defaultValue) {
|
29
|
-
|
30
|
-
|
31
|
-
|
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;
|