1
0
Fork 0
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:
Sean Morley 2024-04-28 13:59:45 +00:00
parent 8ae3236acb
commit eed9b2fad2
2 changed files with 8 additions and 2 deletions

View file

@ -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) {

View file

@ -14,6 +14,8 @@
if (data.usingVercel === "true") {
inject();
injectSpeedInsights();
} else {
console.log("Not using Vercel");
}
let isServerSetup = data.isServerSetup;