From f8da187e67f39c465c4d67304e6a805b3fb4c44e Mon Sep 17 00:00:00 2001 From: "winjo.gwj" Date: Tue, 30 May 2023 18:08:48 +0800 Subject: [PATCH] fix: check if currentGroup is empty when split terminal --- .../terminal-next/src/browser/contribution/terminal.command.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/terminal-next/src/browser/contribution/terminal.command.ts b/packages/terminal-next/src/browser/contribution/terminal.command.ts index c556a6e19b..d7d1955d32 100644 --- a/packages/terminal-next/src/browser/contribution/terminal.command.ts +++ b/packages/terminal-next/src/browser/contribution/terminal.command.ts @@ -105,6 +105,9 @@ export class TerminalCommandContribution implements CommandContribution { { execute: () => { const group = this.view.currentGroup; + if (!group) { + return; + } const widget = this.view.createWidget(group); this.view.selectWidget(widget.id); },