Skip to content

Commit 3f4d687

Browse files
create new family within existing one for v-if directive
1 parent f9600d5 commit 3f4d687

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rules/v-if-else-key.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,18 @@ module.exports = {
217217
if (node.parent && node.parent.type === 'VElement') {
218218
let conditionalFamily = conditionalFamilies.get(node.parent)
219219

220-
if (conditionType === 'if' && !conditionalFamily) {
220+
if (!conditionalFamily) {
221221
conditionalFamily = createConditionalFamily(node)
222222
conditionalFamilies.set(node.parent, conditionalFamily)
223223
}
224224

225225
if (conditionalFamily) {
226226
switch (conditionType) {
227+
case 'if': {
228+
conditionalFamily = createConditionalFamily(node)
229+
conditionalFamilies.set(node.parent, conditionalFamily)
230+
break
231+
}
227232
case 'else-if': {
228233
conditionalFamily.elseIf.push(node)
229234
break

0 commit comments

Comments
 (0)