I think the preceding `if` is unnecessary, but then again I've been surprised about when nunjucks will care about undefined variables, and when it won't. Another strategy is to set `app.locals` with a default empty list, although the way this is now is at least crystal clear, if a bit verbose.