Skip to content

Commit f3bc262

Browse files
committed
Fix invalid return before inserting search restuls.
1 parent 0b1a272 commit f3bc262

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main/java/il/org/osm/israelhiking/PlanetSearchProfile.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ private void addNonIconFeaturesToElasricseach(SourceFeature feature) throws Geom
439439
return;
440440
}
441441
var pointDocument = new PointDocument();
442+
if ((feature.getString("wikidata") != null || feature.getString("wikipedia") != null)) {
443+
pointDocument.poiIconColor = "black";
444+
pointDocument.poiIcon = "icon-wikipedia-w";
445+
pointDocument.poiCategory = "Wikipedia";
446+
}
442447
if (feature.hasTag("amenity", "place_of_worship") ||
443448
feature.hasTag("natural", "valley")) {
444449
pointDocument.poiIcon = "icon-search";
@@ -466,12 +471,6 @@ private void addNonIconFeaturesToElasricseach(SourceFeature feature) throws Geom
466471
pointDocument.poiIconColor = "#008000";
467472
pointDocument.poiCategory = "Other";
468473
}
469-
if ((feature.getString("wikidata") != null || feature.getString("wikipedia") != null)) {
470-
pointDocument.poiIconColor = "black";
471-
pointDocument.poiIcon = "icon-wikipedia-w";
472-
pointDocument.poiCategory = "Wikipedia";
473-
return;
474-
}
475474

476475
if (pointDocument.poiIcon == null) {
477476
return;

0 commit comments

Comments
 (0)