From 2a784132f11032480e6996f2217cb2794c798f7b Mon Sep 17 00:00:00 2001 From: FinnChen Date: Thu, 26 Aug 2021 18:06:12 +0800 Subject: [PATCH] fix #9962: set session at the first place when construct `ConsoleWidget` Signed-off-by: FinnChen --- packages/console/src/browser/console-widget.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/console/src/browser/console-widget.ts b/packages/console/src/browser/console-widget.ts index 0714c6d5f7455..7c677135be2c7 100644 --- a/packages/console/src/browser/console-widget.ts +++ b/packages/console/src/browser/console-widget.ts @@ -113,6 +113,7 @@ export class ConsoleWidget extends BaseWidget implements StatefulWidget { } })); + this.session = this.sessionManager.selectedSession; this.toDispose.push(this.sessionManager.onDidChangeSelectedSession(session => { // Don't delete the last session by overriding it with 'undefined' if (session) {