Skip to content

Commit d719b86

Browse files
authored
Fix enabled feature flags object composition (#2899)
### Motivation I made a mistake when mapping the feature flags into an object. They are supposed to be a hash like object and not an array. ### Implementation Used `Object.fromEntries` to build the hash.
1 parent 3d95b97 commit d719b86

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

vscode/src/client.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ interface ServerErrorTelemetryEvent {
5252

5353
type ServerTelemetryEvent = ServerErrorTelemetryEvent;
5454

55-
function enabledFeatureFlags() {
55+
function enabledFeatureFlags(): Record<string, boolean> {
5656
const allKeys = Object.keys(FEATURE_FLAGS) as (keyof typeof FEATURE_FLAGS)[];
57-
58-
return allKeys.map((key) => {
59-
return { [key]: featureEnabled(key) };
60-
});
57+
return Object.fromEntries(allKeys.map((key) => [key, featureEnabled(key)]));
6158
}
6259

6360
// Get the executables to start the server based on the user's configuration

0 commit comments

Comments
 (0)