|
|
@@ -24,7 +24,8 @@ export function genSelf(
|
|
|
context: CodegenContext,
|
|
|
): CodeFragment[] {
|
|
|
const [frag, push] = buildCodeFragment()
|
|
|
- const { id, template, operation, dynamicChildOffset } = dynamic
|
|
|
+ const { id, template, operation, dynamicChildOffset, hasDynamicChild } =
|
|
|
+ dynamic
|
|
|
|
|
|
if (id !== undefined && template !== undefined) {
|
|
|
push(NEWLINE, `const n${id} = t${template}(${dynamicChildOffset || ''})`)
|
|
|
@@ -35,6 +36,10 @@ export function genSelf(
|
|
|
push(...genOperationWithInsertionState(operation, context))
|
|
|
}
|
|
|
|
|
|
+ if (hasDynamicChild) {
|
|
|
+ push(...genChildren(dynamic, context, push, `n${id}`))
|
|
|
+ }
|
|
|
+
|
|
|
return frag
|
|
|
}
|
|
|
|
|
|
@@ -109,7 +114,7 @@ export function genChildren(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (id === child.anchor) {
|
|
|
+ if (id === child.anchor && !child.hasDynamicChild) {
|
|
|
push(...genSelf(child, context))
|
|
|
}
|
|
|
|