Use null-safe navigation for destroying inbox entries when blocking
This commit is contained in:
parent
c7418b5de7
commit
4814ccdaa5
|
@ -14,7 +14,7 @@ class Ajax::AnonymousBlockController < AjaxController
|
|||
question:
|
||||
)
|
||||
|
||||
question.inboxes.first.destroy
|
||||
question.inboxes.first&.destroy
|
||||
|
||||
@response[:status] = :okay
|
||||
@response[:message] = t(".success")
|
||||
|
|
Loading…
Reference in New Issue