Skip to content

Commit

Permalink
fix: compatibility with old browsers (#4544)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored Aug 29, 2022
1 parent 735864c commit 6a430d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client-src/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ 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;
}

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 (let i = 0; i < enabledFeatures.length; i++) {
const key = enabledFeatures[i];
logString += ` ${key} ${features[key] ? "enabled" : "disabled"},`;
}
// replace last comma with a period
logString = logString.slice(0, -1).concat(".");
Expand Down

0 comments on commit 6a430d4

Please sign in to comment.