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

模板变量未定义的问题 #15

Open
hihuimin opened this issue May 16, 2016 · 1 comment
Open

模板变量未定义的问题 #15

hihuimin opened this issue May 16, 2016 · 1 comment

Comments

@hihuimin
Copy link
Member

如果模板里用到了一个未传入的变量,如 <%= username || 'visitor' %> ,会报 ReferenceError: username is not defined 的错误,望修复,谢谢!

@luckyadam
Copy link
Member

luckyadam commented May 17, 2016

可以暂时使用 arguments[0].username 的方式,之前调研过,更换成其他模板引擎的成本较高,会有无法兼容的情况,后续可以换成自研的模板引擎。

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

No branches or pull requests

2 participants