提交 22e27fed 编写于 作者: D Daniel Imms

Add null check

Fixes #13865
上级 82ac9be2
......@@ -225,7 +225,10 @@ export class SwitchTerminalInstanceAction extends Action {
}
public run(item?: string): TPromise<any> {
let selectedTerminalIndex = parseInt(item.split(':')[0], 10) - 1;
if (!item) {
return TPromise.as(null);
}
const selectedTerminalIndex = parseInt(item.split(':')[0], 10) - 1;
this.terminalService.setActiveInstanceByIndex(selectedTerminalIndex);
return this.terminalService.showPanel(true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册