Skip to content

Commit b5f97ae

Browse files
authored
Fix null access (microsoft#209449)
1 parent 5c00163 commit b5f97ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/typescript-language-features/src/extension.browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async function startPreloadWorkspaceContentsIfNeeded(context: vscode.ExtensionCo
118118
return;
119119
}
120120

121-
const workspaceUri = vscode.workspace.workspaceFolders?.[0].uri;
121+
const workspaceUri = vscode.workspace.workspaceFolders?.at(0)?.uri;
122122
if (!workspaceUri || workspaceUri.scheme !== 'vscode-vfs' || !workspaceUri.authority.startsWith('github')) {
123123
logger.info(`Skipped loading workspace contents for repository ${workspaceUri?.toString()}`);
124124
return;

0 commit comments

Comments
 (0)