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

'undefined' overlay var #61

Closed
aerosol opened this issue Oct 2, 2013 · 2 comments
Closed

'undefined' overlay var #61

aerosol opened this issue Oct 2, 2013 · 2 comments

Comments

@aerosol
Copy link

aerosol commented Oct 2, 2013

For {foo, undefined} overlay variable relx produces {foo, } causing the release fail to start due to syntax error. Is there a workaround for this?

@tsloughter
Copy link
Member

Are you saying that {foo, undefined} in the variables will replace {{foo}} with nothing instead of the atom undefined?

@tsloughter
Copy link
Member

Ah, so I tested this in erlydtl:

1> erlydtl:compile(<<"<html>{{ foo }}</html>">>, my_module_name).
{ok,my_module_name}
2> my_module_name:render([{foo, undefined}]).
{ok,[<<"<html>">>,[],<<"</html>">>]}

So that is a part of erlydtl that relx uses for templates.

Let me know if I can close this issue. It would need to be taken up with erlydtl.

@aerosol aerosol closed this as completed Oct 10, 2013
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