Skip to content

nested loops - must specify keys #35

@KittenHero

Description

@KittenHero

example:

props => pug`
for row, y in props.grid
  for cell, x in row
    span(key=y*row.length + x)  #{cell}
`

workaround - use a flat array or insert a grouping element

props => pug`
for row, y in props.grid
  div(key=y)
    for cell, x in row
      span(key=x) #{cell}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions