The reason is that the current code assumes the render engine is synchronous and calls next after making its last render call. This is not a valid expectation (ejs does not follow this).
With this change, next is only called after the full rendering is done.
With ejs 2.x, compound stops working.
The reason is that the current code assumes the render engine is synchronous and calls next after making its last render call. This is not a valid expectation (ejs does not follow this).
With this change, next is only called after the full rendering is done.
Fix compoundjs with ejs 2.x (1.x still works)