Apply safe navigation to Reactions::Send (#16570)
This commit is contained in:
parent
292383175b
commit
6feefe6694
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ module Notifications
|
|||
notification = Notification.find_or_initialize_by(notification_params)
|
||||
|
||||
old_json_data = notification.json_data
|
||||
previous_siblings_size = notification.json_data["reaction"]["aggregated_siblings"].size if old_json_data
|
||||
previous_siblings_size = old_json_data.dig("reaction", "aggregated_siblings")&.size if old_json_data
|
||||
|
||||
notification.json_data = json_data
|
||||
notification.notified_at = Time.current
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue