mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-05 13:15:18 +02:00
Fix error handling in layout server file and add console log in layout svelte file
This commit is contained in:
parent
8ae3236acb
commit
eed9b2fad2
2 changed files with 8 additions and 2 deletions
|
@ -1,8 +1,12 @@
|
|||
import type { LayoutServerLoad, PageServerLoad } from "./$types";
|
||||
let USING_VERCEL: string;
|
||||
|
||||
try {
|
||||
USING_VERCEL = require("$env/static/private").USING_VERCEL;
|
||||
} catch (error) {}
|
||||
const env = await import("$env/static/private");
|
||||
USING_VERCEL = env.USING_VERCEL;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
export const load: LayoutServerLoad = async (event) => {
|
||||
if (event.locals.user) {
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
if (data.usingVercel === "true") {
|
||||
inject();
|
||||
injectSpeedInsights();
|
||||
} else {
|
||||
console.log("Not using Vercel");
|
||||
}
|
||||
|
||||
let isServerSetup = data.isServerSetup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue