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

string-template can't return number 0 #576

Open
lizy0329-biubiubiu opened this issue Jan 31, 2024 · 0 comments
Open

string-template can't return number 0 #576

lizy0329-biubiubiu opened this issue Jan 31, 2024 · 0 comments

Comments

@lizy0329-biubiubiu
Copy link

lizy0329-biubiubiu commented Jan 31, 2024

If value is 0, return ''. How about fix it to return String(value) || ''

return value || '';

And I find that: keyParts[i] will return ' setting' when templete is {{ setting.count }}, so lead to value[keyParts[i]] is undefined

@lizy0329-biubiubiu lizy0329-biubiubiu changed the title string-template do not return number type value string-template can't return number 0 Jan 31, 2024
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