Looping nested array

div
each i in data.history
  table(style='margin-top: 50px;')
    caption Histórico #{i.info.dt_saida}
    thead
     tr(style='background-color: #24a8e0')
        th(scope='col') Data de entrada
        th(scope='col') Data de saída
        th(scope='col') Valor total
     tbody
       tr
         td(data-label='Data de entrada') R$ #{i.info.dt_join}
         td(data-label='Data de saída') R$ #{i.info.dt_saida}
         td(data-label='Valor total') R$ #{i.info.total}
     each x in i.diagnostics

Inside my object, I have the History array. Inside history I have an array called diagnostics.

I'm trying to loop it according to the above code.

But I'm getting the following error:

 119|             td(data-label='Valor total') R$ #{i.info.total}

    120|         each x in i.diagnostics

  > 121| 

expected "indent", but got "outdent"

If in place of each h in i.history I add #{i.diagnostics}, my array appears in the view without giving errors

I am using the jade template engine