Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from ogom/master

Change the position of the if.
  • Loading branch information...
commit 9aa066c99cb9731bd87b101f6dd3c3ba762c07f1 2 parents 3f31575 + 2e4ca76
@logicalparadox logicalparadox authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  chai-stats.js
  2. +1 −1  lib/stats.js
View
2  chai-stats.js
@@ -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
2  lib/stats.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.