Skip to content

Commit

Permalink
fix: no marker and no icon
Browse files Browse the repository at this point in the history
  • Loading branch information
trafficonese committed Apr 16, 2024
1 parent 150415f commit 5844d57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions inst/htmlwidgets/bindings/lfx-search-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ function eventToShiny(e) {
}

function adaptIcon(options) {
var icon = options.marker.icon;

if (icon) {
if (options.marker && options.marker.icon) {
var icon = options.marker.icon;
if (icon.awesomemarker) {
//delete icon.awesomemarker;

Expand Down Expand Up @@ -61,6 +60,8 @@ function adaptIcon(options) {
}
return new L.Icon(icon);
}
} else {
return new L.Icon.Default();
}
}

Expand Down
Loading

0 comments on commit 5844d57

Please sign in to comment.