Remove empty popup image

This commit is contained in:
Ben Goldsworthy 2022-11-28 15:07:30 -06:00
parent 672a440593
commit dbcfb12c52
1 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,9 @@
popupMarkup = `<h2 class="popup__title">{!! $checkin->title ?? "<i>Untitled</i>" !!}</h2>`;
popupMarkup += `{!! $popupContent !!}`;
popupMarkup += '<img class="popup__image" src="{{ $checkin->image_url }}">';
@if($checkin->image_url)
popupMarkup += '<img class="popup__image" src="{{ $checkin->image_url }}">';
@endif
marker.bindPopup(popupMarkup).openPopup();
checkinMarkers[{{ $checkin->id }}] = marker;