Skip to content

Commit

Permalink
fix(prohibit): check name property exists
Browse files Browse the repository at this point in the history
Closes #21.
  • Loading branch information
tlvince committed Nov 4, 2015
1 parent dd53a89 commit a2e081e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prohibit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function (prohibiteds, context) {

return {
'CallExpression': function (node) {
var result = node.callee && node.callee.name.match(regex)
var result = node.callee && node.callee.name && node.callee.name.match(regex)

if (result) {
context.report(node, 'Unexpected {{name}}.', {
Expand Down

0 comments on commit a2e081e

Please sign in to comment.