@carto/api-client 0.5.19 → 0.5.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9513,7 +9513,13 @@ function domainFromAttribute(attribute, scaleType, scaleLength) {
9513
9513
  return attribute.categories.map((c) => c.category).filter((c) => c !== void 0 && c !== null);
9514
9514
  }
9515
9515
  if (scaleType === "quantile" && attribute.quantiles) {
9516
- return "global" in attribute.quantiles ? attribute.quantiles.global[scaleLength] : attribute.quantiles[scaleLength];
9516
+ const quantiles = "global" in attribute.quantiles ? attribute.quantiles.global : attribute.quantiles;
9517
+ if (scaleLength === 2 && !quantiles[2] && quantiles[4]?.length === 5) {
9518
+ return [quantiles[4][0], quantiles[4][2], quantiles[4][4]];
9519
+ }
9520
+ if (quantiles[scaleLength]) {
9521
+ return quantiles[scaleLength];
9522
+ }
9517
9523
  }
9518
9524
  let { min: min2 } = attribute;
9519
9525
  if (scaleType === "log" && min2 === 0) {