Skip to content

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

Description

@froquede

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions