diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index 98e2e6ea444d..2338573ccb2a 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -233,9 +233,9 @@ Engine.prototype = { sum: 0 }; time.forEach(function(val) { - if (val < stat.min || stat.min == null) + if (stat.min == null || val < stat.min) stat.min = val; - if (val > stat.max || stat.max == null) + if (stat.max == null || val > stat.max) stat.max = val; stat.sum += val; });