Skip to content

throw meaningful message if helper function is not defined #105

Closed
wants to merge 4 commits into from

2 participants

@patmoore

Make error message more explicit if the helper function does not exist.

@BorisMoore
Owner

Thanks Pat. See your combined request too.

Currently the design is to allow for jagged data (undefined properties) by rendering {{:undefinedProperty}} as the empty string. I think the same should happen for {{:~undefinedHelper}} (Here undefinedHelper is not necessarily a function, so really this is another way of passing in either data values or methods, just as data.undefined may be a missing method or property from the data model.)

Similarly if foo is a converter {{foo:name}}, or a tag {{foo/}}, we don't throw if they are undefined, but treat them as no-ops, returning the empty string, (or the unchanged value, for a converter).

@BorisMoore BorisMoore closed this Apr 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.