Skip to content

Commit

Permalink
Fixup: Bug fix in LegendView
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnesjy committed Jun 17, 2024
1 parent 064d38a commit 298dc19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/views/maps/LegendView.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ define([
// Check for a color palette model in the Map Asset model. Even imagery layers
// may have a color palette configured, specifically to use to create a
// legend.
this.model.attributes.keys().forEach((attr) => {
if (this.model.attributes[attr] instanceof AssetColorPalette) {
colorPalette = this.model.get(attr);
paletteType = colorPalette.get("paletteType");
Object.values(this.model.attributes).forEach((attr) => {
if (attr instanceof AssetColorPalette) {
colorPalette = attr;
paletteType = attr.get("paletteType");
}
});

Expand Down

0 comments on commit 298dc19

Please sign in to comment.