succuess pt. 10 fix ssr on preview and prod builds

This commit is contained in:
2026-02-05 04:45:06 -08:00
parent ef9453cbc0
commit db16010f1b
4 changed files with 46 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import { browser } from "$app/environment";
import { asset } from "$app/paths";
import { overwriteDatabaseFile } from "$lib/db/client-db";
import { getClientDb } from "$lib/db/client-db";
/**
* Version-keyed seeding for the client-side SQLocal database.
@@ -64,6 +64,8 @@ export async function ensureSeeded(
}
// Prefer streaming when possible.
const { overwriteDatabaseFile } = await getClientDb();
if (res.body) {
await overwriteDatabaseFile(res.body);
} else {