From 929856fd3f894c5ef4c56e6fb6d1f96af13a9d35 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 13 Apr 2022 17:45:41 -0400 Subject: [PATCH] No ugly json access --- src/config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.ts b/src/config.ts index 5822800..d6f59ca 100644 --- a/src/config.ts +++ b/src/config.ts @@ -115,15 +115,15 @@ function migrate(config: SBSConfig) { // Redis change if (config.redis) { const redisConfig = config.redis as any; - if (redisConfig["host"] || redisConfig["port"]) { + if (redisConfig.host || redisConfig.port) { config.redis.socket = { - host: redisConfig["host"], - port: redisConfig["port"] + host: redisConfig.host, + port: redisConfig.port }; } - if (redisConfig["enable_offline_queue"] !== undefined) { - config.disableOfflineQueue = !redisConfig["enable_offline_queue"]; + if (redisConfig.enable_offline_queue !== undefined) { + config.disableOfflineQueue = !redisConfig.enable_offline_queue; } } } \ No newline at end of file