Skip to content

Commit 4f03cfd

Browse files
committed
Fix an issue causing install failures
1 parent 0b94fde commit 4f03cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ async function postInstall(info: PlatformInformation): Promise<void> {
393393
}
394394

395395
async function finalizeExtensionActivation(): Promise<void> {
396-
const settings: CppSettings = new CppSettings(vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri : undefined);
396+
const settings: CppSettings = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined);
397397
if (settings.intelliSenseEngine === "Disabled") {
398398
languageServiceDisabled = true;
399399
getTemporaryCommandRegistrarInstance().disableLanguageServer();

0 commit comments

Comments
 (0)