Use null-safe navigation for destroying inbox entries when blocking

This commit is contained in:
Karina Kwiatek 2022-08-20 19:18:28 +02:00
parent c7418b5de7
commit 4814ccdaa5
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class Ajax::AnonymousBlockController < AjaxController
question:
)
question.inboxes.first.destroy
question.inboxes.first&.destroy
@response[:status] = :okay
@response[:message] = t(".success")