From 9583fa80e0e2d0bc4d19ba70c60fd8d21e21f344 Mon Sep 17 00:00:00 2001 From: 24c02 <163450896+24c02@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:38:58 -0400 Subject: [PATCH] safer navigate --- .../components/templates/hackatime_7_day_streak_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/snail_mail/components/templates/hackatime_7_day_streak_template.rb b/app/lib/snail_mail/components/templates/hackatime_7_day_streak_template.rb index 3e3e4f1..b1d2ec0 100644 --- a/app/lib/snail_mail/components/templates/hackatime_7_day_streak_template.rb +++ b/app/lib/snail_mail/components/templates/hackatime_7_day_streak_template.rb @@ -28,7 +28,7 @@ module SnailMail ca = Date.parse(ca) rescue nil if ca.present? text = <<~EOM - Dearest #{letter.address.first_name.upcase} #{letter.address.last_name[0]&.upcase}., + Dearest #{letter.address&.first_name&.upcase} #{letter.address&.last_name[0]&.upcase}., #{ca.present? ? "On the #{ca.day.ordinalize} of #{Date::MONTHNAMES[ca.month]}" : "Recently"} you joined the ranks of those who have logged coding time on Hackatime 7 days in a row.