File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
packages/compiler-core/src/transforms Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -141,18 +141,9 @@ export function processIf(
141141 }
142142
143143 if ( sibling && sibling . type === NodeTypes . IF ) {
144- // Check if v-else was followed by v-else-if
144+ // Check if v-else was followed by v-else-if or there are two adjacent v-else
145145 if (
146- dir . name === 'else-if' &&
147- sibling . branches [ sibling . branches . length - 1 ] . condition === undefined
148- ) {
149- context . onError (
150- createCompilerError ( ErrorCodes . X_V_ELSE_NO_ADJACENT_IF , node . loc ) ,
151- )
152- }
153- // Check that there should not be two adjacent v-else
154- if (
155- dir . name === 'else' &&
146+ ( dir . name === 'else-if' || dir . name === 'else' ) &&
156147 sibling . branches [ sibling . branches . length - 1 ] . condition === undefined
157148 ) {
158149 context . onError (
You can’t perform that action at this time.
0 commit comments