提交 6d8259cd 编写于 作者: I isidor

open editors: null guard

上级 edb64a32
......@@ -609,7 +609,13 @@ class OpenEditorsDragAndDrop implements IListDragAndDrop<OpenEditor | IEditorGro
}
getDragURI(element: OpenEditor | IEditorGroup): string | null {
return element instanceof OpenEditor ? element.getResource().toString() : null;
if (element instanceof OpenEditor) {
const resource = element.getResource();
if (resource) {
return resource.toString();
}
}
return null;
}
getDragLabel?(elements: (OpenEditor | IEditorGroup)[]): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册