Permalink
Browse files

Merge pull request #2 from ogom/master

Change the position of the if.
  • Loading branch information...
2 parents 3f31575 + 2e4ca76 commit 9aa066c99cb9731bd87b101f6dd3c3ba762c07f1 @logicalparadox logicalparadox committed Jul 31, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 chai-stats.js
  2. +1 −1 lib/stats.js
View
@@ -177,8 +177,8 @@ module.exports = function (chai, _) {
Assertion.overwriteMethod('eql', function (_super) {
return function eql (exp, precision) {
if (flag(this, 'almost')) {
- var act = flag(this, 'object')
if (null == precision) precision = 7;
+ var act = flag(this, 'object')
, tol = 0.5 * Math.pow(10, -precision);
function deepEql (act, exp) {
View
@@ -66,8 +66,8 @@ module.exports = function (chai, _) {
Assertion.overwriteMethod('eql', function (_super) {
return function eql (exp, precision) {
if (flag(this, 'almost')) {
- var act = flag(this, 'object')
if (null == precision) precision = 7;
+ var act = flag(this, 'object')
, tol = 0.5 * Math.pow(10, -precision);
function deepEql (act, exp) {

0 comments on commit 9aa066c

Please sign in to comment.