Skip to content

Commit

Permalink
fix(preview): allow empty slug
Browse files Browse the repository at this point in the history
  • Loading branch information
BJvdA committed May 5, 2021
1 parent 0c06ce7 commit 161e70e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/next/previewHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const nextPreviewHandlers = ({

// Check the secret and next parameters
// This secret should only be known to this API route and the CMS
if (token !== previewToken || !slug) {
if (token !== previewToken) {
return res.status(401).json({ message: 'Invalid token' });
}

Expand Down

1 comment on commit 161e70e

@vercel
Copy link

@vercel vercel bot commented on 161e70e May 5, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.