fix: remove xml html node after compile

This commit is contained in:
多牧 2020-06-24 14:54:21 +08:00 committed by Moyee
parent dd63aeacfa
commit e77876b977

View File

@ -276,8 +276,11 @@ export function createNodeFromXML(gen: string | ((node: any) => string)) {
const xmlParser = document.createElement('div');
xmlParser.innerHTML = target;
const xml = xmlParser.children[0] as HTMLElement;
const result = generateTarget(parseXML(xml));
return generateTarget(parseXML(xml));
xmlParser.remove();
return result;
}
return {