Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement strict and assumeObject modes #932

Merged
merged 1 commit into from
Jan 1, 2015
Merged

Implement strict and assumeObject modes #932

merged 1 commit into from
Jan 1, 2015

Conversation

kpdecker
Copy link
Collaborator

Causes templates to throw when lookup fields are not defined within the
context. Strict mode will throw when any field is omitted. assumeObjects mode
maintains the existing behavior of outputting an empty response when fields
are not defined but allows for performance/size optimizations by not doing
safety checks for intermediate objects in the lookup chain.

Strict mode effectively disables the helperMissing and inverse handling for
blockHelperMissing as templates will throw rather than call those features for
missing data fields.

Fixes #651 Fixes #805

Causes templates to throw when lookup fields are not defined within the context. Strict mode will throw when any field is omitted. assumeObjects mode maintains the existing behavior of outputting an empty response when fields are not defined but allows for performance/size optimizations by not doing safety checks for intermediate objects in the lookup chain.

Strict mode effectively disables the helperMissing and inverse handling for blockHelperMissing as templates will throw rather than call those features for missing data fields.

Fixes #651
Fixes #805
@kpdecker kpdecker added this to the 3.0 milestone Dec 27, 2014
kpdecker added a commit that referenced this pull request Jan 1, 2015
Implement strict and assumeObject modes
@kpdecker kpdecker merged commit 96a5cf5 into master Jan 1, 2015
@kpdecker kpdecker deleted the strict branch January 1, 2015 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant