diff --git a/lib/cartodb/utils/style/postgres-datasource.js b/lib/cartodb/utils/style/postgres-datasource.js index 16e7ed86..c239192a 100644 --- a/lib/cartodb/utils/style/postgres-datasource.js +++ b/lib/cartodb/utils/style/postgres-datasource.js @@ -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;