Closed nzakas closed 9 years ago
This is something that we'd consider as an option but as with every additional option flag I'd like to see the impact on both the library size and the size of the generated code, if a given feature requires a lot of overhead in either situation then it might not make the cut.
That being said, once we implement source map support, this can actually make the lookup much safer as the check for undefined on foo
would not be necessary.
This is closely related to #651
I haven't had time to keep investigating, but my original thought was to:
I was modeling the approach after the SproutCore extensions: https://gist.github.com/SlexAxton/1187974#file-02-schandlebars-js-L54
I didn't get very far down that path before other priorities bubbled up, but at least on the surface, it seemed like the amount of code changes to make this work would be small.
Closing in favor of #932
One thing that has bitten me in Handlebars multiple times is referencing a property that doesn't exist, such as:
If
foo.bar
doesn't exist, then I get no indication in the output that it's missing. I understand that as a default behavior, but I'd prefer to throw an error in that case.I know I can implement this myself by inheriting from
JavaScriptCompiler
, I was just curious if this would be considered as an available option built-in to Handlebars?