alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.

Home Page:https://frontend.design-system.service.gov.uk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task list component should check if item is empty before rendering.

edwardhorsford opened this issue · comments

{{- _taskListItem(params, item, loop.index) }}

The task list component currently renders a line for each item - it should ideally be checking for empty / falsy items and skipping if so. This is relevant as when prototyping you might often do an if statement to decide whether to show a row - and currently the component renders weirdly in this case as you are rendering an empty row.

I think this is handled by something like {% if foo %} in other components.