Skip to content

Commit

Permalink
fix: use strict comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Feb 8, 2016
1 parent 9b4f690 commit 4ddbe66
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bots/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var actions = {
if (params.attribute) {

returnValue = taskGet.getAttribute(casper, params);
if (returnValue != undefined) {
if (returnValue !== undefined) {
log('got', params.attribute + ' of ' + params.selector,
'SUCCESS');
return returnValue;
Expand All @@ -26,7 +26,7 @@ var actions = {
} else if (params.variable) {

returnValue = taskGet.getVariable(casper, params);
if (returnValue != undefined) {
if (returnValue !== undefined) {
log('got global variable: ' + params.variable, 'SUCCESS');
return returnValue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bots/taskGet.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getVariable (casper, params) {
}, object);

accessors.forEach(function (property) {
if (variableValue == undefined) {
if (variableValue === undefined) {
return;
}
variableValue = variableValue[property];
Expand Down
2 changes: 1 addition & 1 deletion test/taskGet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ describe('taskGet', function () {
var taskGet = require('../src/bots/taskGet.js');
var casperStub = {
exists: function (selector) {
if (selector == '#id') {
if (selector === '#id') {
return true;
}
return false;
Expand Down

0 comments on commit 4ddbe66

Please sign in to comment.