提交 268ec647 编写于 作者: J Johannes Rieken

don't read null range, #46893

上级 14a2bc02
......@@ -210,6 +210,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
}
this.editor.deltaDecorations(this._positionMarkerId, []);
this._positionMarkerId = [];
}
public create(): void {
......@@ -280,10 +281,14 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
public get position(): Position {
const [id] = this._positionMarkerId;
if (id) {
return this.editor.getModel().getDecorationRange(id).getStartPosition();
if (!id) {
return undefined;
}
return undefined;
const range = this.editor.getModel().getDecorationRange(id);
if (!range) {
return undefined;
}
return range.getStartPosition();
}
protected _isShowing: boolean = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册