squirrellyjs / squirrelly

Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺
https://squirrelly.js.org
MIT License
634 stars 83 forks source link

Activating async causes the loop helpers to return [object Promise] #149

Closed adriangith closed 4 years ago

adriangith commented 4 years ago

Bug Setting async: true when calling Sqrl.render causes the foreach and each helpers to return [object Promise]

Expected behavior Should return the text within the helper blocks

Package & Environment Details

nebrelbug commented 4 years ago

Hi @adriangith, thanks for reporting the issue! This was a problem with Squirrelly's async implementation. I actually decided to just rewrite async handling, and I'll hopefully push the fixes tomorrow :smiley:

nebrelbug commented 4 years ago

Hi @adriangith, I just realized I forgot to respond! Just so you know, newer versions of Squirrelly 8 have this problem fixed :)