Skip to content

Commit

Permalink
Merge pull request #1064 from ljharb/fix_no_cycle
Browse files Browse the repository at this point in the history
[Fix] `no-cycle`: `create` must *always* return an object, even if no listeners
  • Loading branch information
ljharb committed Apr 7, 2018
2 parents 80d1ceb + 19fc3df commit d8077c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/no-cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {

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

const options = context.options[0] || {}
const maxDepth = options.maxDepth || Infinity
Expand Down

0 comments on commit d8077c8

Please sign in to comment.