Skip to content

Commit ac0556f

Browse files
authored
[Bug] Fixed result reference in speedtest completed mail (alexjustesen#1492)
1 parent 11d000e commit ac0556f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Mail/SpeedtestCompletedMail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function content(): Content
5151
'ping' => round($this->result->ping, 2).' ms',
5252
'download' => Number::toBitRate(bits: $this->result->download_bits, precision: 2),
5353
'upload' => Number::toBitRate(bits: $this->result->upload_bits, precision: 2),
54-
'packetLoss' => $event->result->packet_loss,
54+
'packetLoss' => is_numeric($this->result->packet_loss) ? $this->result->packet_loss : 'n/a',
5555
'url' => url('/admin/results'),
5656
],
5757
);

resources/views/emails/speedtest-completed.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| Ping | {{ $ping }} |
1212
| Download | {{ $download }} |
1313
| Upload | {{ $upload }} |
14-
| Packet Loss | {{ $packetLoss }} **%** |
14+
| Packet Loss | {{ $packetLoss }}**%** |
1515

1616
</x-mail::table>
1717

0 commit comments

Comments
 (0)