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

fix #78 rule is not iterable error #79

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

lecstor
Copy link
Contributor

@lecstor lecstor commented Jul 3, 2024

Remove undefined values from rules array before passing to stylex babel plugin.

Logging rules just before stylexBabelPlugin.processStylexRules is called shows it has many undefined values in the array, which it does not have in the initial run when starting the devserver.

Filtering out the undefined values appears to resolve the issue.

Unfortunately I can't say how to replicate this issue, though I do know my this past message that I'm not the only one to see it.. #24 (comment)

{
  rules: [
    undefined,
    undefined,
    [ 'xngnso2', [Object], 3000 ],
    [ 'x1evy7pa', [Object], 3000 ],
    [ 'x10ipcqr', [Object], 3000 ],
    undefined,
    undefined,
    undefined,
    [ 'x78zum5', [Object], 3000 ],
    [ 'xdt5ytf', [Object], 3000 ],
    [ 'x6s0dn4', [Object], 3000 ],
    [ 'xagnifm', [Object], 1200 ],
    undefined,
  ]
}

Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: 3f16727

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vite-plugin-stylex Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@HorusGoul HorusGoul merged commit 00f28ca into HorusGoul:main Jul 4, 2024
10 checks passed
@HorusGoul
Copy link
Owner

Thanks for the contribution!

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