|
@@ -26,6 +26,7 @@ export function ssrProcessIf(
|
|
|
node: IfNode,
|
|
node: IfNode,
|
|
|
context: SSRTransformContext,
|
|
context: SSRTransformContext,
|
|
|
disableNestedFragments = false,
|
|
disableNestedFragments = false,
|
|
|
|
|
+ disableCommentAsIfAlternate = false,
|
|
|
) {
|
|
) {
|
|
|
const [rootBranch] = node.branches
|
|
const [rootBranch] = node.branches
|
|
|
const ifStatement = createIfStatement(
|
|
const ifStatement = createIfStatement(
|
|
@@ -54,7 +55,7 @@ export function ssrProcessIf(
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (!currentIf.alternate) {
|
|
|
|
|
|
|
+ if (!currentIf.alternate && !disableCommentAsIfAlternate) {
|
|
|
currentIf.alternate = createBlockStatement([
|
|
currentIf.alternate = createBlockStatement([
|
|
|
createCallExpression(`_push`, ['`<!---->`']),
|
|
createCallExpression(`_push`, ['`<!---->`']),
|
|
|
])
|
|
])
|