Skip to content

Commit

Permalink
Fix issue with redirect route when no baseSettings exist
Browse files Browse the repository at this point in the history
  • Loading branch information
apop880 committed Feb 15, 2023
1 parent f1a0dc9 commit de1f3ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rootfs/src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import type { LayoutServerLoad } from "./$types";

export const load = (async ({ route }) => {
const baseSettings = await prisma.baseSettings.findFirst();
if (!baseSettings && route.id !== "/(config)/settings") {
console.log(route.id)
if (!baseSettings && route.id !== "/(admin)/settings") {
throw redirect(302, "/settings")
}

Expand Down

0 comments on commit de1f3ec

Please sign in to comment.