fix(compiler): properly bail stringfication for nested slot elements

This commit is contained in:
Evan You
2021-03-05 11:10:58 -05:00
parent aea88c3280
commit f74b16ccfe
2 changed files with 9 additions and 5 deletions

View File

@@ -60,11 +60,8 @@ type StringifiableNode = PlainElementNode | TextCallNode
* This optimization is only performed in Node.js.
*/
export const stringifyStatic: HoistTransform = (children, context, parent) => {
if (
parent.type === NodeTypes.ELEMENT &&
(parent.tagType === ElementTypes.COMPONENT ||
parent.tagType === ElementTypes.TEMPLATE)
) {
// bail stringification for slot content
if (context.scopes.vSlot > 0) {
return
}