Skip to content

Commit 6cafca0

Browse files
committed
attempt to load routes when NASA API KEY is missing
1 parent ea12477 commit 6cafca0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/planets/[planet]/+page.server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { dev } from '$app/environment';
99
import { NASA_API_KEY } from '$env/static/private';
1010

1111
export const load: PageServerLoad = async ({ params, fetch }) : Promise<Partial<PlanetCardProps>> => {
12-
if (params.planet !== 'mars') {
12+
if (!NASA_API_KEY || params.planet !== 'mars') {
1313
return {};
1414
}
1515

0 commit comments

Comments
 (0)