提交 d8ea9d9d 编写于 作者: D Daniel Imms

Fix null check in terminal

上级 a136d24f
......@@ -762,7 +762,11 @@ export class TerminalInstance implements ITerminalInstance {
if (!this._xterm) {
return;
}
const text = window.getSelection().toString();
const selection = window.getSelection();
if (!selection) {
return;
}
const text = selection.toString();
if (!text || force) {
this._xterm.focus();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册