Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fungiboletus authored Jun 25, 2018
1 parent 9d64ca1 commit 34036eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/avoid-scope-typos.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
},
create: function(context) {
function check(node, name) {
if (bad.indexOf(name) >= 0 && scope.indexOf(node.parent.object.name) >= 0) {
if (bad.indexOf(name) >= 0 && node && node.parent && node.parent.object && scope.indexOf(node.parent.object.name) >= 0) {
context.report(node, `The ${name} method should be replaced by $${name}, or you should rename it in order to avoid confusions`, {});
}
}
Expand Down

1 comment on commit 34036eb

@Bob-Thomas
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ay just noticed we did the same fix for different issues EmmanuelDemey#554

Please sign in to comment.