Skip to content

Commit

Permalink
Merge pull request #2 from ogom/master
Browse files Browse the repository at this point in the history
Change the position of the if.
  • Loading branch information
logicalparadox committed Jul 31, 2012
2 parents 3f31575 + 2e4ca76 commit 9aa066c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chai-stats.js
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/stats.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 9aa066c

Please sign in to comment.