Skip to content

Commit

Permalink
Fix null access (#209449)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz authored Apr 3, 2024
1 parent 5c00163 commit b5f97ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async function startPreloadWorkspaceContentsIfNeeded(context: vscode.ExtensionCo
return;
}

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

0 comments on commit b5f97ae

Please sign in to comment.