Skip to content

Commit

Permalink
One-line if statements look awkward coupled with else's.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 25, 2014
1 parent 0fe3c93 commit 93cca9a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,13 @@
var numbers = [];
Array.prototype.every.call(arguments, function (arg) {
var num = Number(arg);
if (Number.isNaN(num)) anyNaN = true;
else if (num === Infinity || num === -Infinity) anyInfinity = true;
else if (num !== 0) allZero = false;
if (Number.isNaN(num)) {
anyNaN = true;
} else if (num === Infinity || num === -Infinity) {
anyInfinity = true;
} else if (num !== 0) {
allZero = false;
}
if (anyInfinity) {
return false;
} else if (!anyNaN) {
Expand Down

0 comments on commit 93cca9a

Please sign in to comment.