succuess pt. 10 fix ssr on preview and prod builds
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user