Skip to content

Commit

Permalink
Try to fix solid renderer when there are many
Browse files Browse the repository at this point in the history
  • Loading branch information
elite174 committed Oct 7, 2024
1 parent da70fb2 commit d89706c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/astro/src/runtime/server/render/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,16 @@ async function renderFrameworkComponent(
} else {
let error;

// we'll process solid in the end
renderers.sort((a) => a.name === '@astrojs/solid' ? 1 : -1);
for (const r of renderers) {
// As solid is the last renderer in the list
// if we still don't have a renderer, we'll use solid
if (r.name === '@astrojs/solid') {
renderer = r;
break;
}

try {
if (await r.ssr.check.call({ result }, Component, props, children)) {
renderer = r;
Expand Down

0 comments on commit d89706c

Please sign in to comment.