提交 66a44df0 编写于 作者: I isidor

null guard

上级 0e6b6a9b
......@@ -21,7 +21,7 @@ export function getResourceForCommand(resource: URI | object | { from: string },
return resource;
}
let list = listService.lastFocusedList;
if ('from' in resource && resource.from === 'menu') {
if (resource && 'from' in resource && resource.from === 'menu') {
// Ignore list if the command is triggered from the main menu
list = undefined;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册