Skip to content

Commit 79fd662

Browse files
committed
fix: setCurrentPos.. only if no initial position
1 parent 20ea717 commit 79fd662

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/location-picker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export default class LocationPicker {
4343
this.element.children[0].appendChild(node)
4444
}
4545

46-
if (pO.setCurrentPosition) {
46+
// Set center to current position if attribute `setCurrentPosition` is true and no initial position is set
47+
if (pO.setCurrentPosition && !pO.lat && !pO.lng) {
4748
this.setCurrentPosition()
4849
}
4950
}

0 commit comments

Comments
 (0)