You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8cc6f6d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: sanity/lib/fetch.ts
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,8 @@ export async function sanityFetch<QueryResponse>({
19
19
* The Sanity Presentation Tool will enable Draft Mode when loading up the live preview, and we use it as a signal for when to embed source maps.
20
20
* When outside of the Sanity Studio we also support the Vercel Toolbar Visual Editing feature, which is only enabled in production when it's a Vercel Preview Deployment.
21
21
*/
22
-
// stega = perspective === "previewDrafts" ||
23
-
// process.env.VERCEL_ENV === "preview",
24
-
stega =false,
22
+
stega =perspective==="previewDrafts"||
23
+
process.env.VERCEL_ENV==="preview",
25
24
}: {
26
25
query: string;
27
26
params?: QueryParams;
@@ -30,7 +29,7 @@ export async function sanityFetch<QueryResponse>({
30
29
}){
31
30
if(perspective==="previewDrafts"){
32
31
returnclient.fetch<QueryResponse>(query,params,{
33
-
stega: false,
32
+
stega,
34
33
perspective: "previewDrafts",
35
34
// The token is required to fetch draft content
36
35
token,
@@ -41,7 +40,7 @@ export async function sanityFetch<QueryResponse>({
41
40
});
42
41
}
43
42
returnclient.fetch<QueryResponse>(query,params,{
44
-
stega: false,
43
+
stega,
45
44
perspective: "published",
46
45
// The `published` perspective is available on the API CDN
0 commit comments