Use an empty array as default value for falsy ramps

Fixes #507
This commit is contained in:
Raul Ochoa
2016-06-20 13:27:39 +02:00
parent 373ad69306
commit 403dcbebcd

View File

@@ -81,7 +81,7 @@ PostgresDatasource.prototype.getRamp = function (column, buckets, method, callba
}
var strategy = method2strategy[methodName];
var ramp = result[0][methodName];
var ramp = result[0][methodName] || [];
if (strategy !== STRATEGY.EXACT) {
ramp = ramp.sort(function(a, b) {
return a - b;