Skip to content

Commit 22b8ec6

Browse files
committed
1918 Root can be undefined here
1 parent 0df7d74 commit 22b8ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export async function initProjectDir(uri?: vscode.Uri): Promise<void> {
184184
export function resolvePath(filePath?: string): vscode.Uri {
185185
const root = getProjectWsFolder();
186186

187-
if (root.uri.scheme !== 'file') {
187+
if (root && root.uri.scheme !== 'file') {
188188
return vscode.Uri.joinPath(root.uri, filePath);
189189
}
190190

0 commit comments

Comments
 (0)