Skip to content

Commit

Permalink
Fix astro build error (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown authored Dec 8, 2023
1 parent ae9810e commit 42089ab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-icons-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystatic/astro': patch
---

Fix build error
12 changes: 9 additions & 3 deletions packages/astro/src/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ export function makeHandler(_config: APIRouteConfig) {
..._config,
clientId:
_config.clientId ??
tryOrUndefined(() => import.meta.env.KEYSTATIC_GITHUB_CLIENT_ID),
tryOrUndefined(() => {
return import.meta.env.KEYSTATIC_GITHUB_CLIENT_ID;
}),
clientSecret:
_config.clientSecret ??
tryOrUndefined(() => import.meta.env.KEYSTATIC_GITHUB_CLIENT_SECRET),
tryOrUndefined(() => {
return import.meta.env.KEYSTATIC_GITHUB_CLIENT_SECRET;
}),
secret:
_config.secret ??
tryOrUndefined(() => import.meta.env.KEYSTATIC_SECRET),
tryOrUndefined(() => {
return import.meta.env.KEYSTATIC_SECRET;
}),
},
{
slugEnvName: 'PUBLIC_KEYSTATIC_GITHUB_APP_SLUG',
Expand Down

2 comments on commit 42089ab

@vercel
Copy link

@vercel vercel bot commented on 42089ab Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 42089ab Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

keystatic – ./dev-projects/next-app

keystatic-git-main-thinkmill-labs.vercel.app
keystatic-thinkmill-labs.vercel.app
keystatic.vercel.app

Please sign in to comment.