Commit 7b26686c by Tyler Hallada

Use if conditionals in place of nested ternary

parent 4094b28d
......@@ -143,10 +143,13 @@ define(function (require) {
* @param range Array of min and max. May be null.
*/
inMetricRange: function(value, range) {
return _.isNull(range) ? false :
(value === Infinity && range[1] === Infinity) ? true :
(value === range[0] && range[0] === range[1]) ? true :
value >= range[0] && value < range[1];
if (_.isNull(range)) {
return false;
} else if ((value === Infinity && range[1] === Infinity) ||
(value === range[0] && range[0] === range[1])) {
return true;
}
return value >= range[0] && value < range[1];
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment