Skip to content

Commit

Permalink
Slight tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
dkadrioski13 committed Jun 16, 2016
1 parent 0a6af90 commit fa7f65f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-angular-classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = function (context) {

return {
'CallExpression': function (node) {
if (node.arguments && node.arguments[0].hasOwnProperty('value')) {
if (node.arguments && node.arguments.length && node.arguments[0].hasOwnProperty('value')) {
if (isCSSLocator(node)) {
for (var i = 0; i < prohibitedClasses.length; i++) {
if (node.arguments[0].value.indexOf(prohibitedClasses[i]) >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/use-angular-locators.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function (context) {

return {
'CallExpression': function (node) {
if (node.arguments && node.arguments[0].hasOwnProperty('value')) {
if (node.arguments && node.arguments.length && node.arguments[0].hasOwnProperty('value')) {
if (isCSSLocator(node)) {
Object.keys(attributeToLocatorMap).forEach(function (key) {
if (node.arguments[0].value.indexOf(key) >= 0) {
Expand Down

0 comments on commit fa7f65f

Please sign in to comment.