Skip to content

Commit

Permalink
fix: set preview token when a content release perspective is used
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Dec 5, 2024
1 parent d2491ad commit 03557ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-loader/src/defineLive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export function defineLive(config: DefineSanityLiveOptions): {
filterResponse: false,
perspective: perspective as ClientPerspective,
stega,
token: perspective === 'previewDrafts' && serverToken ? serverToken : originalToken,
token: perspective !== 'published' && serverToken ? serverToken : originalToken,
next: {
revalidate:
(fetchOptions?.revalidate ?? process.env.NODE_ENV === 'production') ? false : undefined,
Expand Down

0 comments on commit 03557ef

Please sign in to comment.