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

Give helpers precedence over input properties #22

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

thekid
Copy link
Member

@thekid thekid commented Oct 8, 2022

If a helper is registered by the same name as a property of an input object, the helper has priority over the input property. If you want to resolve the input property instead, you can prefix its name with ./ or this.

See https://handlebarsjs.com/guide/expressions.html#disambiguating-helpers-calls-and-property-lookup

⚠️ This pull request is a fix, but it's also a BC break for templates - we'll release this as a major version!

@thekid thekid merged commit f8d5bcb into master Oct 8, 2022
@thekid thekid deleted the refactor/helper-precedence branch October 8, 2022 11:15
thekid added a commit to xp-forge/handlebars-templates that referenced this pull request Oct 8, 2022
@thekid
Copy link
Member Author

thekid commented Oct 8, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant