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

functions should return constant itself when it not defined #122

Open
1dnmr opened this issue May 11, 2018 · 2 comments
Open

functions should return constant itself when it not defined #122

1dnmr opened this issue May 11, 2018 · 2 comments

Comments

@1dnmr
Copy link

1dnmr commented May 11, 2018

Hello,

This is really critical issue,
If you forget define a constant (or made typo) all js code on the page can't stop working because of error "not found". Functions Lang.get(), Lang.choise() etc should check whether constant is defined and return it if not. Not Error! This is like Laravel trans() and trans_choice() functions works.

Please fix asap.

Thank you

@rmariuzzo
Copy link
Owner

Hey @1dnmr! Can you add a snippet so I can reproduce. I believe that any key not found, will just restun the same key, instead of throwing an error.

@1dnmr
Copy link
Author

1dnmr commented May 29, 2018

Hi @rmariuzzo !
I think I understand this issue wrong. Js error occurs if I make typo in constants name(
Unfortunately it leads to stop execution of other js.

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