Skip to content

Commit f7adfc8

Browse files
authored
Fix a formatting bug (#8922)
1 parent 125b657 commit f7adfc8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Extension/src/LanguageServer/settings.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,16 @@ export class CppSettings extends Settings {
712712
return true;
713713
}
714714
}
715-
if (editorConfigSettings.root?.toLowerCase() === "true") {
716-
return true;
715+
if (editorConfigSettings.root !== undefined) {
716+
if (typeof editorConfigSettings.root === "boolean") {
717+
if (editorConfigSettings.root) {
718+
return true;
719+
}
720+
} else if (typeof editorConfigSettings.root === "string") {
721+
if (editorConfigSettings.root.toLowerCase() === "true") {
722+
return true;
723+
}
724+
}
717725
}
718726
} else {
719727
const clangFormatPath1: string = path.join(parentPath, ".clang-format");

0 commit comments

Comments
 (0)