mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-07 06:05:19 +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";
|
import type { LayoutServerLoad, PageServerLoad } from "./$types";
|
||||||
let USING_VERCEL: string;
|
let USING_VERCEL: string;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
USING_VERCEL = require("$env/static/private").USING_VERCEL;
|
const env = await import("$env/static/private");
|
||||||
} catch (error) {}
|
USING_VERCEL = env.USING_VERCEL;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
|
||||||
export const load: LayoutServerLoad = async (event) => {
|
export const load: LayoutServerLoad = async (event) => {
|
||||||
if (event.locals.user) {
|
if (event.locals.user) {
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
if (data.usingVercel === "true") {
|
if (data.usingVercel === "true") {
|
||||||
inject();
|
inject();
|
||||||
injectSpeedInsights();
|
injectSpeedInsights();
|
||||||
|
} else {
|
||||||
|
console.log("Not using Vercel");
|
||||||
}
|
}
|
||||||
|
|
||||||
let isServerSetup = data.isServerSetup;
|
let isServerSetup = data.isServerSetup;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue