Skip to content

Commit 096c623

Browse files
Gargronhiyuki2578
authored andcommitted
Fix error in user warning template (mastodon#11741)
1 parent a214ba4 commit 096c623

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/views/user_mailer/warning.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
- unless @warning.text.blank?
4343
= Formatter.instance.linkify(@warning.text)
4444

45-
- unless @statuses&.empty?
45+
- if !@statuses.nil? && !@statuses.empty?
4646
%p
4747
%strong= t('user_mailer.warning.statuses')
4848

49-
- unless @statuses&.empty?
49+
- if !@statuses.nil? && !@statuses.empty?
5050
- @statuses.each_with_index do |status, i|
5151
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true
5252

app/views/user_mailer/warning.text.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<% end %>
99
<%= @warning.text %>
10-
<% unless @statuses&.empty? %>
10+
<% if !@statuses.nil? && !@statuses.empty? %>
1111
<%= t('user_mailer.warning.statuses') %>
1212

1313
<% @statuses.each do |status| %>

0 commit comments

Comments
 (0)