Skip to content

Commit

Permalink
fix: make sure all AGS layer ids compared in print-legend are numbers (
Browse files Browse the repository at this point in the history
  • Loading branch information
Grammostola authored Aug 17, 2022
1 parent 2e45974 commit da5d7f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controls/print/print-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const LayerRow = function LayerRow(options) {
if (!json) {
return getTitleWithIcon(title, '');
}
const legendLayer = json.layers.find((l) => l.layerId === id || l.layerName === id);
const legendLayer = json.layers.find((l) => +l.layerId === +id || l.layerName === id);
if (!legendLayer) {
return getTitleWithIcon(title, '');
}
Expand Down

0 comments on commit da5d7f5

Please sign in to comment.