Skip to content

Commit

Permalink
fix: add missing stega options
Browse files Browse the repository at this point in the history
  • Loading branch information
nkgentile committed Aug 3, 2024
1 parent 5058728 commit 4c87f79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function createSanityLoader(options: CreateSanityLoaderOptions): SanityLo

/**

Check warning on line 108 in package/src/loader.ts

View workflow job for this annotation

GitHub Actions / Lint & Build

Unexpected 'todo' comment: '* * TODO: should this default to the...'

Check warning on line 108 in package/src/loader.ts

View workflow job for this annotation

GitHub Actions / Lint & Build

Unexpected 'todo' comment: '* * TODO: should this default to the...'
* TODO: should this default to the latest API version?
* Or at least warn if a version that doesn't support perspectivves is used?
* Or at least warn if a version that doesn't support perspectives is used?
*/
if (client.config().apiVersion === '1') {
client = client.withConfig({apiVersion: 'v2022-03-07'})
Expand All @@ -122,7 +122,11 @@ export function createSanityLoader(options: CreateSanityLoaderOptions): SanityLo
useCdn: false,
token: preview.token,
perspective: 'previewDrafts' as const,
stega: {enabled: true, studioUrl: preview.studioUrl},
stega: {
...client.config().stega,
enabled: true,
studioUrl: preview.studioUrl,
},
})

queryStore.setServerClient(previewClient)
Expand Down

0 comments on commit 4c87f79

Please sign in to comment.