File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,16 @@ const casing = require('../utils/casing')
35
35
* @returns {boolean } True if there are sibling nodes of the same type and conditionally rendered, false otherwise.
36
36
*/
37
37
const hasConditionalRenderedSiblings = ( node , componentName ) => {
38
- if ( node . parent && node . parent . type === 'VElement' ) {
39
- return node . parent . children . some (
40
- ( sibling ) =>
41
- sibling !== node &&
42
- sibling . type === 'VElement' &&
43
- sibling . rawName === componentName &&
44
- hasConditionalDirective ( sibling )
45
- )
38
+ if ( ! node . parent || node . parent . type !== 'VElement' ) {
39
+ return false
46
40
}
47
-
48
- return false
41
+ return node . parent . children . some (
42
+ ( sibling ) =>
43
+ sibling !== node &&
44
+ sibling . type === 'VElement' &&
45
+ sibling . rawName === componentName &&
46
+ hasConditionalDirective ( sibling )
47
+ )
49
48
}
50
49
51
50
/**
You can’t perform that action at this time.
0 commit comments