Description
I was debugging some templates another dev wrote which were not working. He was prototyping with Handelbars for proof of concept and to see how it worked. His custom block helper was not working. We read through the docs and looked for JS errors in the console (there were none) and attempted to debug what was going on.
After a while, I noticed he had placed his registerHelper() call after his compile() call to the source template. I suggested moving registerHelper() above the compile() assuming that the helper was not available when compile() fired. It instantly fixed everything.
The problem is, Handlebars didn't throw an error like "helper function 'list' is not registered." Instead, Handlebars silently handled the error, which was not helpful for debug purposes. Please throw errors when Handlebars encounters one, thanks!