Skip to content

Commit 9719027

Browse files
committed
1 parent 5a5619f commit 9719027

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ast.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ class AstSerializer {
11211121
if(htmlProp) {
11221122
// Reprocess content
11231123
htmlContent = await this.compileString(htmlContent, node, slots, options);
1124-
} else {
1124+
} else { // @text
11251125
htmlContent = escapeText(htmlContent);
11261126
}
11271127

@@ -1270,6 +1270,13 @@ class AstSerializer {
12701270
if(!node.childNodes) {
12711271
node.childNodes = [];
12721272
}
1273+
1274+
// remove any already added nodes
1275+
node.childNodes = node.childNodes.filter(entry => {
1276+
return !entry._webCProcessed;
1277+
});
1278+
1279+
// WARNING: side effects (filtered above)
12731280
node.childNodes.push(propContentNode);
12741281
} else {
12751282
componentHasContent = propContentNode.value.trim().length > 0;

0 commit comments

Comments
 (0)