From d8d07ad9a8560785439c1fd5264d78f6df8bd273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Zitouni?= <92778930+cazitouni@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:15:23 +0100 Subject: [PATCH] Fix feature count in IdentifyViewer.jsx (#344) --- components/IdentifyViewer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/IdentifyViewer.jsx b/components/IdentifyViewer.jsx index b535e14c1..c7e08ad0a 100644 --- a/components/IdentifyViewer.jsx +++ b/components/IdentifyViewer.jsx @@ -541,7 +541,7 @@ class IdentifyViewer extends React.Component { ))} - {LocaleUtils.tr("identify.featurecount")}: {Object.values(this.state.resultTree || {}).flat().length} + {LocaleUtils.tr("identify.featurecount")}: {Object.values(this.state.selectedLayer !== '' ? this.state.resultTree[this.state.selectedLayer] : this.state.resultTree ).flat().length} {Object.keys(this.state.selectedLayer !== '' ? { [this.state.selectedLayer]: this.state.resultTree[this.state.selectedLayer] } : this.state.resultTree).map(layer => { const layerResults = this.state.resultTree[layer];