Skip to content

Commit

Permalink
fix(dev): remove object
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Nov 13, 2024
1 parent 924830a commit 9b5c908
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-jars-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dreamkit/dev": patch
---

Remove object on reload routes
8 changes: 4 additions & 4 deletions packages/dev/src/adapters/solid-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ export function createDreamkitDevServer(
(router.name === "ssr" || router.name === "client");
if (!isVinxiRouterPage) return;
const id = vinxiRoute.path;
if (action === "remove") {
if (router.name === "ssr" && server.app.objects.has(id))
await server.app.remove([id]);
} else if (action === "add" || action === "update") {
if (router.name === "ssr" && server.app.objects.has(id))
await server.app.remove([id]);

if (action === "add" || action === "update") {
const routeObject = await server.fetchDefault(vinxiRoute.filePath);
if (isRoute(routeObject))
vinxiRoute.$$route = {
Expand Down

0 comments on commit 9b5c908

Please sign in to comment.