Skip to content

Add extra type cast to String before call split() - #76

Open
MinhThienDX wants to merge 1 commit into
tuupola:2.xfrom
MinhThienDX:2.x
Open

Add extra type cast to String before call split()#76
MinhThienDX wants to merge 1 commit into
tuupola:2.xfrom
MinhThienDX:2.x

Conversation

@MinhThienDX

Copy link
Copy Markdown

Fix bug when call split() on number
Similar to this PR #74 but he changed the minified version

Fix bug when call split() on number
@pduey

pduey commented Sep 18, 2019

Copy link
Copy Markdown

Instead of calling data("chained") and casting to String, per the jquery docs, we could call attr("data-chained") instead, and instead of coercing strings into numbers, the String type will be preserved.

I've done that on my own branch and it works.

// var data = $(this).data("chained");
var data = $(this).attr("data-chained");

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

Successfully merging this pull request may close these issues.

2 participants