From de8f10e1f81ba08fe3fd01eb3f1970e360b63080 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sat, 20 Aug 2022 09:07:00 +0530 Subject: [PATCH 1/2] fix: compatibility with old browsers --- client-src/utils/log.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-src/utils/log.js b/client-src/utils/log.js index cd7f62569d..30f9166f01 100644 --- a/client-src/utils/log.js +++ b/client-src/utils/log.js @@ -27,8 +27,8 @@ const logEnabledFeatures = (features) => { let logString = "Server started:"; // Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled. - for (const [key, value] of Object.entries(features)) { - logString += ` ${key} ${value ? "enabled" : "disabled"},`; + for (const key of Object.keys(features)) { + logString += ` ${key} ${features[key] ? "enabled" : "disabled"},`; } // replace last comma with a period logString = logString.slice(0, -1).concat("."); From 24e25ccfd02975cabf36b8cf3f1abb3e6ace08bb Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sat, 27 Aug 2022 07:03:47 +0530 Subject: [PATCH 2/2] fix: compatibility with old browsers --- client-src/utils/log.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client-src/utils/log.js b/client-src/utils/log.js index 30f9166f01..a62aee544b 100644 --- a/client-src/utils/log.js +++ b/client-src/utils/log.js @@ -19,7 +19,7 @@ setLogLevel(defaultLevel); const log = logger.getLogger(name); const logEnabledFeatures = (features) => { - const enabledFeatures = Object.entries(features); + const enabledFeatures = Object.keys(features); if (!features || enabledFeatures.length === 0) { return; } @@ -27,7 +27,8 @@ const logEnabledFeatures = (features) => { let logString = "Server started:"; // Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled. - for (const key of Object.keys(features)) { + for (let i = 0; i < enabledFeatures.length; i++) { + const key = enabledFeatures[i]; logString += ` ${key} ${features[key] ? "enabled" : "disabled"},`; } // replace last comma with a period