diff --git a/app/Mail/SpeedtestCompletedMail.php b/app/Mail/SpeedtestCompletedMail.php index 0b05b9231..da973d279 100644 --- a/app/Mail/SpeedtestCompletedMail.php +++ b/app/Mail/SpeedtestCompletedMail.php @@ -51,7 +51,7 @@ public function content(): Content 'ping' => round($this->result->ping, 2).' ms', 'download' => Number::toBitRate(bits: $this->result->download_bits, precision: 2), 'upload' => Number::toBitRate(bits: $this->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, + 'packetLoss' => is_numeric($this->result->packet_loss) ? $this->result->packet_loss : 'n/a', 'url' => url('/admin/results'), ], ); diff --git a/resources/views/emails/speedtest-completed.blade.php b/resources/views/emails/speedtest-completed.blade.php index ab353ef57..341edc3ec 100644 --- a/resources/views/emails/speedtest-completed.blade.php +++ b/resources/views/emails/speedtest-completed.blade.php @@ -11,7 +11,7 @@ | Ping | {{ $ping }} | | Download | {{ $download }} | | Upload | {{ $upload }} | -| Packet Loss | {{ $packetLoss }} **%** | +| Packet Loss | {{ $packetLoss }}**%** |