Fix division by Zero in pireps/show.blade.php (#1493)

* Fix division by Zero in pireps/show.blade.php

Division by Zero caused by possible null distance fixed by adding check.

* Update show.blade.php

* Update show.blade.php

* Update show.blade.php

Final form :)
This commit is contained in:
fagidutt 2022-11-03 17:11:57 +01:00 committed by GitHub
parent 41bd325f9a
commit 00918f54aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,16 +72,18 @@
</div> </div>
</div> </div>
<div class="row"> @if(!empty($pirep->distance))
<div class="col-12"> <div class="row">
<div class="progress" style="margin: 20px 0;"> <div class="col-12">
<div class="progress-bar progress-bar-success" role="progressbar" <div class="progress" style="margin: 20px 0;">
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" <div class="progress-bar progress-bar-success" role="progressbar"
style="width: {{$pirep->progress_percent}}%;"> aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
style="width: {{$pirep->progress_percent}}%;">
</div>
</div> </div>
</div> </div>
</div> </div>
</div> @endif
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">