yairEO / tagify

🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue
https://yaireo.github.io/tagify/
Other
3.55k stars 436 forks source link

t.forEach is not a function #1393

Closed YeZawPaing closed 4 weeks ago

YeZawPaing commented 4 weeks ago

Prerequisites

💥 Demo Page

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" name="email" class="tagify">
</body>
<script src="https://unpkg.com/@yaireo/tagify"></script>
<script>
    var input = document.querySelector('input[name=email]');
    new Tagify(input);
</script>

</html>

Explanation

tagify:28 Uncaught TypeError: t.forEach is not a function at Q.addTags (tagify:28:67646) at Q.loadOriginalValues (tagify:28:53518) at new Q (tagify:28:48502) at index.html:16:5

CasualJon commented 4 weeks ago

Found this as well when using vanilla's latest from jsdelivr. Downloading source from release v4.31.3 and loading that locally does not encounter the issue, so it's happening only in v4.31.4 - at least for me.

Looking at the sources tab to inspect the error, I'm finding the following - I'll admit I don't know this is the cause of, caused by, or neither for the t.forEach is not a function error... Screenshot 2024-10-24 at 4 38 26 PM

BriCusack commented 4 weeks ago

I just got this morning 4 hours out from a production build deployment 🤣

preshndams commented 4 weeks ago

I'm currently facing same issue, please any idea on how to fix?

Maremic commented 4 weeks ago

image the same issue

YeZawPaing commented 4 weeks ago

I think it's happening on latest version which is 4.31.4. If you add previous version to the cdn, it will fix the issue temporarily like this.

BriCusack commented 3 weeks ago

I think it's happening on latest version which is 4.31.4. If you add previous version to the cdn, it will fix the issue temporarily like this.

Yes, was an oversight during code review. Always lock your versions and or use a package manager with set periodic update reviews.