chore: clean setMarker
This commit is contained in:
parent
14e38cb573
commit
0065a9f9a9
1 changed files with 1 additions and 5 deletions
|
@ -58,11 +58,7 @@
|
|||
|
||||
function setMarker(pos: L.LatLng) {
|
||||
if (map && !results) {
|
||||
if (playerMarker) {
|
||||
playerMarker = playerMarker.setLatLng(pos);
|
||||
} else {
|
||||
playerMarker = L.marker(pos).addTo(map);
|
||||
}
|
||||
playerMarker = (playerMarker ?? L.marker(pos).addTo(map)).setLatLng(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue