We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 524a18c commit 2b7d517Copy full SHA for 2b7d517
src/src/app/components/trip/trip.component.ts
@@ -496,9 +496,11 @@ export class TripComponent implements AfterViewInit {
496
resetMapBounds() {
497
if (!this.places.length) {
498
if (!this.trip?.days.length) return;
499
+ const itemsWithCoordinates = this.flattenedTripItems.filter((i) => i.lat != null && i.lng != null);
500
+ if (!itemsWithCoordinates.length) return;
501
502
this.map?.fitBounds(
- this.flattenedTripItems.filter((i) => i.lat != null && i.lng != null).map((i) => [i.lat!, i.lng!]),
503
+ itemsWithCoordinates.map((i) => [i.lat!, i.lng!]),
504
{ padding: [30, 30] },
505
);
506
return;
0 commit comments