Skip to content

Commit

Permalink
fix(auth): await auth to prevent console.variables() from throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed May 13, 2024
1 parent 20b860e commit 361a410
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/console/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { sdk } from '$lib/stores/sdk';
import { isCloud } from '$lib/system';
import type { LayoutLoad } from './$types';

export const load: LayoutLoad = async ({ fetch, depends }) => {
export const load: LayoutLoad = async ({ fetch, depends, parent }) => {
await parent(); // ensure user is authenticated before proceeding

depends(Dependencies.RUNTIMES);
depends(Dependencies.CONSOLE_VARIABLES);

Expand Down

0 comments on commit 361a410

Please sign in to comment.