diff --git a/src/runtime/entrypoints/main.ts b/src/runtime/entrypoints/main.ts index 21e542c2..88a01d2e 100644 --- a/src/runtime/entrypoints/main.ts +++ b/src/runtime/entrypoints/main.ts @@ -698,8 +698,10 @@ export async function applyPartials(res: Response): Promise { await Promise.all(promises); - if (deserialize) { - state = deserialize(stateDom!, signal) as SerializedState; + if (stateDom) { + state = deserialize + ? deserialize(stateDom, signal) as SerializedState + : JSON.parse(stateDom)?.v; } // Collect all partials and build up the vnode tree diff --git a/tests/fixture_partials/routes/island_props/index.tsx b/tests/fixture_partials/routes/island_props/index.tsx index 80d2da33..8e124660 100644 --- a/tests/fixture_partials/routes/island_props/index.tsx +++ b/tests/fixture_partials/routes/island_props/index.tsx @@ -1,21 +1,18 @@ import { Partial } from "$fresh/runtime.ts"; -import { Fader } from "../../islands/Fader.tsx"; import PropIsland from "../../islands/PropIsland.tsx"; export default function PropsDemo() { return (
- -

initial

- -
+

initial

+

{ return ( - -

updated

- - +

updated

+ ); });