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

don't read null range, #46893

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