We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea12477 commit 6cafca0Copy full SHA for 6cafca0
src/routes/planets/[planet]/+page.server.ts
@@ -9,7 +9,7 @@ import { dev } from '$app/environment';
9
import { NASA_API_KEY } from '$env/static/private';
10
11
export const load: PageServerLoad = async ({ params, fetch }) : Promise<Partial<PlanetCardProps>> => {
12
- if (params.planet !== 'mars') {
+ if (!NASA_API_KEY || params.planet !== 'mars') {
13
return {};
14
}
15
0 commit comments