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
... however, the filter function does not have access to the name of the replacement that is missing, so it is not possible to provide a helpful error message.
Describe the solution you'd like
The filter function could be called with the name of the missing replacement as a second argument to enable helpful error messages:
@cpetrov I like this idea, but it's difficult to implement without writing something to try and parse JS. For example, what should happen if somebody writes <%= it.name + "!" %>? What should happen if somebody writes <%= undefined %>? Those are both possibilities with Eta.
Is your feature request related to a problem? Please describe.
Currently, when a replacement is not defined, Eta will render
undefined
in its place:This is not ideal, as it will lead to
undefined
being rendered in the output. This is rarely desired.As recommended in the related issue #28, one can use
filterFunction
to handle missing replacements:... however, the filter function does not have access to the name of the replacement that is missing, so it is not possible to provide a helpful error message.
Describe the solution you'd like
The filter function could be called with the name of the missing replacement as a second argument to enable helpful error messages:
The text was updated successfully, but these errors were encountered: