fix: Partial state deserialization on simple islands (#1873)

This commit is contained in:
Tiago Gimenes
2023-10-07 23:08:04 +02:00
committed by GitHub
parent 2df5921b59
commit 15f869715c
3 changed files with 20 additions and 23 deletions
+4 -2
View File
@@ -698,8 +698,10 @@ export async function applyPartials(res: Response): Promise<void> {
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