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

Handle case where object expression has spread element without keys #4

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

TobbenTM
Copy link
Contributor

@TobbenTM TobbenTM commented Nov 9, 2023

Small patch to avoid getting errors when seeing object expressions containing spread elements without keys like these:

{
  "type": "ObjectExpression",
  "properties": [
    {
      "type": "SpreadElement",
      "argument": {
        "type": "Identifier",
        "name": "props"
      }
    }
  ]
}

As far as I understand the code here, skipping any properties without a key should be totally fine, but let me know if we need to do some extra work to identify them.

@TobbenTM
Copy link
Contributor Author

To add some context @bradlc , if trying to update the packages of the Tailwind UI Protocol template to the latest Next.js, MDX loaders, etc, then this error will occur. Any chance we can get this quick fix merged and released? It's blocking my upgrade path at the moment 😅

@bradlc
Copy link
Owner

bradlc commented Nov 12, 2023

Thanks!

@bradlc bradlc merged commit 0453f18 into bradlc:main Nov 12, 2023
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.

None yet

2 participants