提交 804096b8 编写于 作者: J Johannes Rieken

fix #16101

上级 fc8ebdea
......@@ -409,8 +409,10 @@ export function find(node: Node, position: IPosition): Node {
var result: Node;
if (node instanceof NodeList) {
for (var i = 0, len = node.children.length; i < len && !result; i++) {
result = find(node.children[i], position);
if (node.hasChildren) {
for (var i = 0, len = node.children.length; i < len && !result; i++) {
result = find(node.children[i], position);
}
}
} else if (node instanceof Block) {
......@@ -418,4 +420,4 @@ export function find(node: Node, position: IPosition): Node {
}
return result || node;
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册