Skip to content

Commit e588bdf

Browse files
committed
feat: consider whether exist node.templateBody
1 parent 7f2c386 commit e588bdf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/rules/no-empty-component-block.js

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ module.exports = {
4949
create(context) {
5050
return {
5151
Program(node) {
52+
if (!node.templateBody) {
53+
return
54+
}
55+
5256
const componentBlocks = node.templateBody.parent.children
5357

5458
for (const componentBlock of componentBlocks) {

0 commit comments

Comments
 (0)