Skip to content

Commit

Permalink
copybooks to work without open ws folder
Browse files Browse the repository at this point in the history
  • Loading branch information
KutluOzel-b committed Apr 22, 2024
1 parent 7e7d02e commit 57ee20a
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ export class SettingsUtils {
fsPath: boolean | undefined = undefined,
): string[] {
const result: string[] = [];
const workspaceFolders = vscode.workspace.workspaceFolders!;
workspaceFolders.forEach((workspaceFolder) => {
result.push(
fsPath === undefined
? workspaceFolder.uri.path
: workspaceFolder.uri.fsPath,
);
});
const workspaceFolders = vscode.workspace.workspaceFolders;
if (workspaceFolders) {
workspaceFolders.forEach((workspaceFolder) => {
result.push(
fsPath === undefined
? workspaceFolder.uri.path
: workspaceFolder.uri.fsPath,
);
});
}
return result;
}
}

0 comments on commit 57ee20a

Please sign in to comment.