From da5d7f5a2f5e4b8b3ac15f7a5430deb0b7199e55 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 17 Aug 2022 10:44:34 +0200 Subject: [PATCH] fix: make sure all AGS layer ids compared in print-legend are numbers (#1581) --- src/controls/print/print-legend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/print/print-legend.js b/src/controls/print/print-legend.js index c67db11bd..06bbfbf53 100644 --- a/src/controls/print/print-legend.js +++ b/src/controls/print/print-legend.js @@ -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, ''); }