Skip to content

Commit 7c96afc

Browse files
Merge pull request #54 from digipolisantwerp/bugfix/GIS-539
Fix: only add coordinate if search is triggered with coordinates
2 parents d89d4ec + fd1f464 commit 7c96afc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ All notable changes to this project will be documented in this file.
1313
"### Security" in case of vulnerabilities.
1414
-->
1515

16+
### Fixed
17+
- When param addCoordinateToResultsAt is provided: only add result when search is triggered by coordinate
18+
1619
## [4.8.0] - 2021-04-19
1720

1821
### Fixed

projects/ngx-location-picker/src/lib/components/ngx-location-picker.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ export class NgxLocationPickerComponent implements OnInit, OnDestroy, ControlVal
464464
this.foundLocations = response;
465465

466466
//adds used coordinate to result list
467-
if (this.addCoordinateToResultsAt) {
467+
if (this.addCoordinateToResultsAt && this.pickedLocation) {
468468
this.foundLocations.splice(this.addCoordinateToResultsAt, 0, this.previousLocation);
469469
}
470470

0 commit comments

Comments
 (0)