File tree 1 file changed +10
-14
lines changed
packages/compiler-core/src/transforms
1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -108,21 +108,17 @@ export const transformIf = createStructuralDirectiveTransform(
108
108
// attach this branch's codegen node to the v-if root.
109
109
let parentCondition = sibling . codegenNode
110
110
. expressions [ 1 ] as ConditionalExpression
111
- while ( true ) {
112
- if (
113
- parentCondition . alternate . type ===
114
- NodeTypes . JS_CONDITIONAL_EXPRESSION
115
- ) {
116
- parentCondition = parentCondition . alternate
117
- } else {
118
- parentCondition . alternate = createCodegenNodeForBranch (
119
- branch ,
120
- sibling . branches . length - 1 ,
121
- context
122
- )
123
- break
124
- }
111
+ while (
112
+ parentCondition . alternate . type ===
113
+ NodeTypes . JS_CONDITIONAL_EXPRESSION
114
+ ) {
115
+ parentCondition = parentCondition . alternate
125
116
}
117
+ parentCondition . alternate = createCodegenNodeForBranch (
118
+ branch ,
119
+ sibling . branches . length - 1 ,
120
+ context
121
+ )
126
122
} else {
127
123
context . onError (
128
124
createCompilerError ( ErrorCodes . X_V_ELSE_NO_ADJACENT_IF , node . loc )
You can’t perform that action at this time.
0 commit comments