Skip to content

Commit

Permalink
Fix geostats creation when column names contain unicode or special ch…
Browse files Browse the repository at this point in the history
…aracters
  • Loading branch information
underbluewaters committed Nov 17, 2024
1 parent 9987eb6 commit 765bb92
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export async function geostatsForVectorLayers(
layer.hasZ = hasZ;
}
for (const attribute of layer.attributes) {
const value = feature.fields.get(attribute.attribute);
// Use the index of the attribute, rather than the attribute name/key,
// as this can cause issues when there are unicode names
const value = feature.fields.get(layer.attributes.indexOf(attribute));
if (value === null) {
continue;
}
Expand Down

0 comments on commit 765bb92

Please sign in to comment.