Skip to content

Async filters don't work if render callback is not used #1474

@olegsmetanin

Description

@olegsmetanin

"nunjucks": "^3.2.4",

Async filter

.addFilter('await', async function (value, cb) {
  const res = await new Promise((_resolve, _reject) => {
    _resolve(value)
  })
  cb(null, res)
}, true)

with template

{% asyncEach rec in ["qwe"] | await %}
{{ rec }}
{% endeach %}

doesn't work and renders nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions