diff --git a/.eslintrc b/.eslintrc index e379dfe7..34a6589b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -54,7 +54,7 @@ "default-case": 0, "dot-notation": 2, "dot-location": 0, - "eqeqeq": 2, + "eqeqeq": [2, "allow-null"], "guard-for-in": 0, "no-alert": 2, "no-caller": 2, diff --git a/src/Layout.js b/src/Layout.js index 1ddec262..d37a47f2 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -112,7 +112,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.marginBottom; break; } - if (value !== null && typeof value !== 'undefined') { + if (typeof value !== 'undefined') { return value; } @@ -136,7 +136,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.marginTop; break; } - if (value !== null && typeof value !== 'undefined') { + if (value != null) { return value; } @@ -161,7 +161,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.paddingBottom; break; } - if (value !== null && value >= 0) { + if (value != null && value >= 0) { return value; } @@ -186,7 +186,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.paddingTop; break; } - if (value !== null && value >= 0) { + if (value != null && value >= 0) { return value; } @@ -211,7 +211,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.borderBottomWidth; break; } - if (value !== null && value >= 0) { + if (value != null && value >= 0) { return value; } @@ -236,7 +236,7 @@ var computeLayout = (function() { case 'column-reverse': value = node.style.borderTopWidth; break; } - if (value !== null && value >= 0) { + if (value != null && value >= 0) { return value; }