diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-10 12:01:07 +1000 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-10 12:01:07 +1000 |
| commit | 8dfdc5e33514443e463b1accc1053dc986def4d4 (patch) | |
| tree | 46860a907e32a7a3c10122ba3e8692fee055e5f0 /templates/mod/view_ip.html | |
| parent | c8d609ecf15eee27ad393f6d711ead87b99a04c7 (diff) | |
Based on #157 and #158, revert back to existence checks and length rather than default empty array initialization for ease of reading
Diffstat (limited to 'templates/mod/view_ip.html')
| -rw-r--r-- | templates/mod/view_ip.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index 6735ff6f..20a4573d 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -18,7 +18,7 @@ <legend>{{ notes|count }} {% trans notes_on_record %}</legend> </legend> - {% if notes|default([])|length > 0 %} + {% if notes and noteslength > 0 %} <table class="modlog"> <tr> <th>{% trans 'Staff' %}</th> @@ -81,7 +81,7 @@ </fieldset> {% endif %} -{% if bans|default([])|length > 0 and mod|hasPermission(config.mod.view_ban) %} +{% if bans and bans|length > 0 and mod|hasPermission(config.mod.view_ban) %} <fieldset id="bans"> {% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %} <legend>{{ bans|count }} {% trans bans_on_record %}</legend> @@ -174,7 +174,7 @@ </fieldset> {% endif %} -{% if logs|default([])|length > 0 %} +{% if logs and logs|length > 0 %} <fieldset id="history"> <legend>History</legend> <table class="modlog" style="width:100%"> |
