Skip to content

Commit d8077c8

Browse files
authored
Merge pull request #1064 from ljharb/fix_no_cycle
[Fix] `no-cycle`: `create` must *always* return an object, even if no listeners
2 parents 80d1ceb + 19fc3df commit d8077c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/rules/no-cycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222

2323
create: function (context) {
2424
const myPath = context.getFilename()
25-
if (myPath === '<text>') return // can't cycle-check a non-file
25+
if (myPath === '<text>') return {} // can't cycle-check a non-file
2626

2727
const options = context.options[0] || {}
2828
const maxDepth = options.maxDepth || Infinity

0 commit comments

Comments
 (0)