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

It crashes when passed values dynamically #491

Open
fadsel opened this issue Jul 20, 2015 · 1 comment
Open

It crashes when passed values dynamically #491

fadsel opened this issue Jul 20, 2015 · 1 comment

Comments

@fadsel
Copy link

fadsel commented Jul 20, 2015

If you have a variable lets say

var lang = {}; // some json result

It cannot be initialized with those values
I tried alot of ways ..

I added extra quotes , I even tested with/without getting json from server i.e i echoed with php's encode_json

offText: "" + lang['final'] + "",
onText: "" + lang['draft'] + "",

without

offText:  lang['final'] ,
onText:  lang['draft'] ,

It can only be initialized by using string literals 😞

@fadsel
Copy link
Author

fadsel commented Jul 20, 2015

i managed to do this with single quotes

onText: '' + lang['draft'] + ' ', //hack

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

1 participant