Skip to content

Commit

Permalink
Fix error in feature search logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Sep 9, 2024
1 parent 46066e5 commit 228932a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/feature/textFeatureSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ class TextFeatureSource extends BaseFeatureSource {
for (let feature of featureList) {
for (let field of searchableFields) {
let key
if (typeof feature.getAttributeValue === 'function') {
if(feature.hasOwnProperty(field)) {
key = feature[field];
}
else if (typeof feature.getAttributeValue === 'function') {
key = feature.getAttributeValue(field)
}
if (key) {
Expand Down

0 comments on commit 228932a

Please sign in to comment.