From: captaineaglex Date: Tue, 7 Dec 2021 13:45:57 +0000 (+0300) Subject: fix performanceStorage type assignment when not present X-Git-Tag: v1.1.38~1^2^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c360d0aa936101140325d26aa5d396f48be63c8d;p=e-mobility-charging-stations-simulator.git fix performanceStorage type assignment when not present --- diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 6777e8cc..bf25445c 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -61,7 +61,9 @@ export default class Configuration { storageConfiguration = { ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'enabled') && { enabled: Configuration.getConfig().performanceStorage.enabled }, - ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'type') && { type: Configuration.getConfig().performanceStorage.type }, + ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'type') + ? { type: Configuration.getConfig().performanceStorage.type } + : { type: StorageType.JSON_FILE }, ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'uri') ? { uri: Configuration.getConfig().performanceStorage.uri } : { uri: this.getDefaultPerformanceStorageUri(Configuration.getConfig()?.performanceStorage?.type ?? StorageType.JSON_FILE) }