fastify / point-of-view

Template rendering plugin for Fastify
MIT License
338 stars 86 forks source link

Fix hbs with layout not throwing errors correctly #363

Closed MellowMelon closed 1 year ago

MellowMelon commented 1 year ago

In #147, changes were made to get Handlebars to throw errors correctly, with a test. However, in the case where Handlebars was used with a global layout provided, things were still broken. The withLayout helper threw an error directly in the middle of callback code. This PR provides a test demonstrating the failure along with the fix of that mistake.

Checklist