Repository navigation
Fix Vue render-function components crashing when @astrojs/react is enabled - #17985
Merged
Merged
Conversation
…ith React integration React's `check` function crashed on non-React object components by accessing `Component['$$typeof'].toString()` without a null guard. Added optional chaining so it returns `false` instead of throwing. Vue's `check` function only recognized template-compiled SFCs (via `ssrRender` / `__ssrInlineRender`). Extended it to also match `defineComponent()` components that have a `setup` function, covering render-function-only SFCs and JS modules. Fixes #17983
1 task done
🦋 Changeset detectedLatest commit: 238279d The changes in this PR will be included in the next version bump. 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 |
matthewp
approved these changes
Sep 14, 2026
Merged
Closed
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
.vueSFCs and.jsfiles usingdefineComponent()) no longer crash duringastro buildwhen@astrojs/reactis also enabled. Previously, React's renderercheckaccessedComponent['$$typeof'].toString()without a null guard, throwing aTypeErroron any object component that lacks$$typeof(such as VuedefineComponent()results).?.) to React'scheckso it returnsfalseinstead of crashing when$$typeofis absent, and extends Vue'scheckto also recognize components that expose asetupfunction but nossrRender/__ssrInlineRenderproperty (i.e. render-function-only components not compiled from a<template>block).Testing
packages/integrations/vue/test/multi-renderer.test.tscovering render-function.vueSFCs and.jsdefineComponent()components in a multi-framework project that includes the React integration, asserting they build and server-render correctly without throwing.Docs
Closes #17983