Skip to content

Commit 251735c

Browse files
committed
Correctly read language specific settings
1 parent 6486ee8 commit 251735c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

client/src/extension.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -811,14 +811,15 @@ function realActivate(context: ExtensionContext): void {
811811
let result: boolean | undefined = undefined;
812812
const languageConfig = Workspace.getConfiguration(undefined, document.uri).get<LanguageSettings>(`[${document.languageId}]`);
813813

814-
function isEnabled(value: CodeActionsOnSave | string[]): boolean {
814+
function isEnabled(value: CodeActionsOnSave | string[]): boolean | undefined {
815815
if (value === undefined || value === null) {
816-
return false;
816+
return undefined;
817817
}
818818
if (Array.isArray(value)) {
819-
return value.some((element) => { return element === 'source.fixAll.eslint' || element === 'source.fixAll'; });
819+
const result = value.some((element) => { return element === 'source.fixAll.eslint' || element === 'source.fixAll'; });
820+
return result === true ? true : undefined;
820821
} else {
821-
return (value['source.fixAll.eslint'] ?? value['source.fixAll']) === true;
822+
return value['source.fixAll.eslint'] ?? value['source.fixAll'];
822823
}
823824
}
824825

0 commit comments

Comments
 (0)