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

When data-name is a number the unicode_slice function returns empty string #28

Open
froquede opened this issue Apr 17, 2017 · 0 comments

Comments

@froquede
Copy link

If the element contains the attribute data-name with only numbers the result of unicode_slice is an empty string on v0.2.0, the v0.1.0 throws the error on substring function and stops the iteration.
Based on some tests on casting strings (http://jsben.ch/#/ghQYR) problably the best way to resolve this is casting with '' for better performance.

Line 63:

var c = unicode_slice('' + settings.name, 0, settings.charCount).toUpperCase();
froquede pushed a commit to froquede/initial.js that referenced this issue Apr 17, 2017
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