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

t.forEach is not a function #1393

Closed
2 tasks done
YeZawPaing opened this issue Oct 24, 2024 · 6 comments
Closed
2 tasks done

t.forEach is not a function #1393

YeZawPaing opened this issue Oct 24, 2024 · 6 comments

Comments

@YeZawPaing
Copy link

YeZawPaing commented Oct 24, 2024

Prerequisites

  • I am running the latest version
  • I'm using this cdn <script src="https://unpkg.com/@yaireo/tagify"></script>

💥 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

  • What is the expected behavior?

  • I expected it to work just like the examples, but when I used it, the following errors appeared

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
Copy link

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
Copy link

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

McNamara84 referenced this issue in McNamara84/gfz-metadata-editor-msl-v2 Oct 25, 2024
CDN-Einbindungen aktualisiert, ReadMe angepasst
@preshndams
Copy link

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

@Maremic
Copy link

Maremic commented Oct 25, 2024

image
the same issue

@YeZawPaing
Copy link
Author

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.

<script src="https://unpkg.com/@yaireo/[email protected]"></script>

@yairEO yairEO closed this as completed in 1d3419f Oct 25, 2024
@BriCusack
Copy link

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.

<script src="https://unpkg.com/@yaireo/[email protected]"></script>

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

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

5 participants