From eb1672c23fceb4d2d5dbd492ffa7cfb3bcd84207 Mon Sep 17 00:00:00 2001 From: MinhThienDX <13492015+MinhThienDX@users.noreply.github.com> Date: Sun, 19 Aug 2018 11:36:55 +0700 Subject: [PATCH] Add extra type cast to String Fix bug when call split() on number --- jquery.chained.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.chained.js b/jquery.chained.js index 8784122..1b05c3a 100644 --- a/jquery.chained.js +++ b/jquery.chained.js @@ -76,7 +76,7 @@ var matches = []; var data = String($(this).data("chained")); if (data) { - matches = data.split(" "); + matches = String(data).split(" "); } if ((matches.indexOf(selected) > -1) || (matches.indexOf(selectedFirst) > -1)) { if ($(this).val() === currentlySelectedValue) {