Fix error handling in layout server file and add console log in layout svelte file
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user