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

Non existant partial inclusions fail silently #83

Closed
Kissaki opened this issue Nov 1, 2018 · 2 comments
Closed

Non existant partial inclusions fail silently #83

Kissaki opened this issue Nov 1, 2018 · 2 comments

Comments

@Kissaki
Copy link
Contributor

Kissaki commented Nov 1, 2018

When including partial files for parsing ({{> filename }}) from Mustache.render_from_file and the file is not found, no issue or error is returned. Instead, the the lib returns a parsed template as if nothing went wrong.

I would expect and error to be raised/nothing to be returned to indicate an error.

@jverzani
Copy link
Owner

jverzani commented Nov 3, 2018

This is due to something I added where {{> name }} is looked up first as a file name, and then as a value within the context. I can add an error if that latter doesn't resolve.

@jverzani
Copy link
Owner

jverzani commented Nov 3, 2018

Actually, in testing to try and fix #82, I see this test: "The empty string should be used when the named partial is not found", so the current behavior seems to be the expected behavior.

@jverzani jverzani closed this as completed Nov 3, 2018
jverzani added a commit that referenced this issue Nov 3, 2018
@jverzani jverzani mentioned this issue Nov 3, 2018
jverzani added a commit that referenced this issue Nov 3, 2018
* address issue #82, comment on issue #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants