mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-21 23:59:34 +01:00
Fix microsoft/vscode-dev/issues/238
This commit is contained in:
@@ -641,8 +641,8 @@ export class ExplorerView extends ViewPane {
|
||||
const previousInput = this.tree.getInput();
|
||||
const promise = this.tree.setInput(input, viewState).then(async () => {
|
||||
if (Array.isArray(input)) {
|
||||
if (!viewState || previousInput instanceof ExplorerItem) {
|
||||
// There is no view state for this workspace, expand all roots. Or we transitioned from a folder workspace.
|
||||
if (!viewState || previousInput instanceof ExplorerItem || !previousInput) {
|
||||
// There is no view state for this workspace, expand all roots. Or we transitioned from a folder/empty workspace.
|
||||
await Promise.all(input.map(async item => {
|
||||
try {
|
||||
await this.tree.expand(item);
|
||||
|
||||
Reference in New Issue
Block a user