From 37c0ea1814c4161abf81eb486f95bdbb9f9ca333 Mon Sep 17 00:00:00 2001 From: Alexander Afanasyev Date: Sun, 31 Jan 2016 09:12:47 -0500 Subject: [PATCH] fix(rules): fixed 'missing-wait-message' object and property check --- lib/rules/missing-wait-message.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rules/missing-wait-message.js b/lib/rules/missing-wait-message.js index 2f3cdef..0b7a488 100644 --- a/lib/rules/missing-wait-message.js +++ b/lib/rules/missing-wait-message.js @@ -8,10 +8,10 @@ module.exports = function (context) { return { 'CallExpression': function (node) { - var objectName = node.callee.object.name - var propertyName = node.callee.property.name + var object = node.callee.object + var property = node.callee.property - if (propertyName === 'wait' && objectName === 'browser' && node.arguments.length < 3) { + if (object && property && property.name === 'wait' && object.name === 'browser' && node.arguments.length < 3) { context.report(node, 'No timeout message provided for browser.wait()') } }