You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jade.render has the signature of an asynchronous function, using a callback instead of returning the rendered HTML. Line 297 of index.js assumes that jade.render will return HTML. My hack to get this to work is (in Coffeescript):
This only works because jade.render actually renders the template synchronously so there's no race condition, but this is super ugly and could break in future versions of Jade if jade.render actual becomes asychronous.
The text was updated successfully, but these errors were encountered:
Maybe. I remember I was getting that error and when I looked into the code I found this bug, but I don't remember if the above fixed the issue in #28 or whether I did something else.
See pugjs/pug#394. TJ Holowaychuk describes the rationale behind Jade's async render. This is, I believe, sort of a fundamental problem because partials have to be computed synchronously.
jade.render has the signature of an asynchronous function, using a callback instead of returning the rendered HTML. Line 297 of index.js assumes that jade.render will return HTML. My hack to get this to work is (in Coffeescript):
This only works because jade.render actually renders the template synchronously so there's no race condition, but this is super ugly and could break in future versions of Jade if jade.render actual becomes asychronous.
The text was updated successfully, but these errors were encountered: