Skip to content

Commit

Permalink
undefined object length check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
toorshia committed Sep 25, 2016
1 parent afd9997 commit e161c41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,9 +1009,9 @@ function kvLookup(key, tablea, tableb, defval, datatype, delimiter) {
function getColor(val, pct, col, noGradient, custSec) {

var no, inc, colors, percentage, rval, gval, bval, lower, upper, range, rangePct, pctLower, pctUpper, color;
var noGradient = noGradient || custSec.ranges.length > 0;
var noGradient = noGradient || custSec.length > 0;

if (custSec.ranges.length > 0) {
if (custSec.length > 0) {
if (custSec.percents === true) val = pct * 100;
for (var i = 0; i < custSec.ranges.length; i++) {
if (val >= custSec.ranges[i].lo && val <= custSec.ranges[i].hi) {
Expand Down

0 comments on commit e161c41

Please sign in to comment.