You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The property "properties.category-x" does not exist in the given context. So the error is in template "article.html" but dust says: "Cannot find reference {properties.category-x} in template html-head".
So maybe dust uses the latest context (html-head partial) instead of the current one?
This makes it very hard to pin down errors in case of may templates.
dustjs swallows the missing reference, it just logs it in "Context.prototype._get". This is very error prone and makes errors hard to find. A missing property is usually a typo or other error in the template. Could you add an option to dustjs to throw an error in such a case?
Thanks a lot
Tom
The text was updated successfully, but these errors were encountered:
Thanks, exactly!
The second issue: Is it possible to add an option to throw errors when properties are not found in the context, e.g. "{properties.category-x}".
Thanks
Hi, I just wanted to follow up with @jimmyhchan to ask if there are any plans to add the option to throw an error in case of a property not found in context. I would really help to build more reliable templates because a missing property usually means an error or typo in the template. Otherwise you miss a lot of potential problems during build-time.
Thanks a lot
Thomas
nodejs 7.4.0
dustjs 2.7.5
Template "article.html":
The property "properties.category-x" does not exist in the given context. So the error is in template "article.html" but dust says: "Cannot find reference
{properties.category-x}
in templatehtml-head
".So maybe dust uses the latest context (html-head partial) instead of the current one?
This makes it very hard to pin down errors in case of may templates.
Thanks a lot
Tom
The text was updated successfully, but these errors were encountered: