提交 38e17053 编写于 作者: R Rob Lourens

Fix childNodes.forEach - DOM api not in .d.ts

上级 31eba965
......@@ -1062,14 +1062,16 @@ export class SettingsRenderer implements ITreeRenderer {
}
function cleanRenderedMarkdown(element: Node): void {
element.childNodes.forEach(child => {
for (let i = 0; i < element.childNodes.length; i++) {
const child = element.childNodes.item(i);
const tagName = (<Element>child).tagName && (<Element>child).tagName.toLowerCase();
if (tagName === 'img' || tagName === 'a') {
if (tagName === 'img') {
element.removeChild(child);
} else {
cleanRenderedMarkdown(child);
}
});
}
}
function getDisplayEnumOptions(setting: ISetting): string[] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册