File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -528,12 +528,15 @@ export class StoreLocator extends BaseComponent {
528528 }
529529
530530 private renderMapDirections ( ) {
531- if ( this . featureSet === FeatureSet . ADVANCED ) {
531+ const originLatLng = this . searchLocation ?. location ;
532+ const destinationLatLng = this . selectedListing ?. position ;
533+ if ( this . featureSet === FeatureSet . ADVANCED && originLatLng &&
534+ destinationLatLng ) {
532535 // clang-format off
533536 return html `
534537 < gmpx-route-overview no-pin
535- .originLatLng =${ this . searchLocation ?. location }
536- .destinationLatLng =${ this . selectedListing ?. position } >
538+ .originLatLng =${ originLatLng }
539+ .destinationLatLng =${ destinationLatLng } >
537540 </ gmpx-route-overview > ` ;
538541 // clang-format on
539542 }
You can’t perform that action at this time.
0 commit comments