api-templates: don't show annotations block in classes if there is an empty list

Previously the block would be hidden only if the annotations property was
falsy, now it is also hidden if the property is also an empty array
This commit is contained in:
Peter Bacon Darwin 2015-11-03 12:26:56 +00:00
parent ca5553e4eb
commit 3fedcc9525
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ p.location-badge.
{$ doc.description | indentForMarkdown(2) | trimBlankLines $} {$ doc.description | indentForMarkdown(2) | trimBlankLines $}
{% endif -%} {% endif -%}
{%- if doc.decorators %} {%- if doc.decorators.length %}
.l-main-section .l-main-section
h2 Annotations h2 Annotations
{%- for decorator in doc.decorators %} {%- for decorator in doc.decorators %}
@ -25,10 +25,10 @@ p.location-badge.
code. code.
@{$ decorator.name $}{$ paramList(decorator.arguments) | indent(8, false) $} @{$ decorator.name $}{$ paramList(decorator.arguments) | indent(8, false) $}
{% endfor %} {% endfor %}
{% endif -%} {%- endif %}
{%- if doc.constructorDoc or doc.members.length -%} {% if doc.constructorDoc or doc.members.length -%}
.l-main-section .l-main-section
h2 Members h2 Members