Skip to content

Commit fa09bb8

Browse files
waynzhFloEdelmann
andauthored
Update lib/rules/no-negated-v-if-condition.js
Co-authored-by: Flo Edelmann <[email protected]>
1 parent 73afcea commit fa09bb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rules/no-negated-v-if-condition.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ module.exports = {
153153
* @returns {string}
154154
*/
155155
function getElementContent(element) {
156-
if (element.children.length === 0) return ''
157-
if (!element.endTag) return ''
156+
if (element.children.length === 0 || !element.endTag) {
157+
return ''
158+
}
158159

159160
const contentStart = element.startTag.range[1]
160161
const contentEnd = element.endTag.range[0]

0 commit comments

Comments
 (0)