<% layout("./layouts/layout.eta") %>

Your answer is not correct.

Correct answer:

<% if (it.data && it.data.length > 0) { %>