Skip to content

Commit

Permalink
Don't blow up if tags aren't defined
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph authored and gitbutler-client committed Sep 12, 2024
1 parent f6e0c27 commit 5663b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/api/[...path].ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const app = new Hono<{ Bindings: AstroContext }>()
throw new Error("Title or H1s should not be a ULID");
}

const primaryTag = props.tags.split(",")[0];
const primaryTag = props.tags?.split(",")[0];
// Set the prefix URL to the first tag (or it's mapped value) if it exists
if (primaryTag && primaryTag !== slug) {
slug = `${
Expand Down

0 comments on commit 5663b86

Please sign in to comment.