Skip to content

Commit 4cc3bb9

Browse files
committed
Updated community.blade.php with 500 bug fix
1 parent 0fe67da commit 4cc3bb9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

resources/views/community.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ class="codeweek-svg-button">
253253
254254
@foreach($teachers->groupBy('city_id') as $cityId => $teachersInCity)
255255
256-
$marker = L.marker([{{$teachersInCity[0]->city->latitude}}, {{$teachersInCity[0]->city->longitude}}]).addTo(mymap)
256+
@if(isset($teachersInCity[0]->city) && $teachersInCity[0]->city->latitude && $teachersInCity[0]->city->longitude)
257+
$marker = L.marker([{{$teachersInCity[0]->city->latitude}}, {{$teachersInCity[0]->city->longitude}}]).addTo(mymap)
258+
@endif
257259
258260
$teachersList = "";
259261
@foreach($teachersInCity as $teacher)

0 commit comments

Comments
 (0)