Skip to content

Commit b845da5

Browse files
committed
feat: consider whether exists context.parserServices.getDocumentFragment
1 parent 4ab0ba8 commit b845da5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/rules/no-empty-component-block.js

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ module.exports = {
4747
* @returns {RuleListener} AST event handlers.
4848
*/
4949
create(context) {
50+
if (!context.parserServices.getDocumentFragment) {
51+
return {}
52+
}
53+
5054
const componentBlocks = context.parserServices.getDocumentFragment()
5155
.children
5256

0 commit comments

Comments
 (0)