Skip to content

Commit

Permalink
fix: ensures singleworkspace falls back to the name 'default' as expe…
Browse files Browse the repository at this point in the history
…cted in all contexts (#8228)
  • Loading branch information
snorrees authored Jan 10, 2025
1 parent 86c6ab1 commit fe708e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ describe('resolveConfig', () => {

const [workspace] = await firstValueFrom(
resolveConfig({
name: 'default',
//the default name should be 'default', in both the workspace and the unstable_sources
//name: 'default',
dataset,
projectId,
auth: createMockAuthStore({client, currentUser: null}),
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/src/core/config/prepareConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function prepareConfig(
const rootPath = getRootPath(options?.basePath)
const workspaceOptions: WorkspaceOptions[] | [SingleWorkspace] = Array.isArray(config)
? config
: [config]
: [{...config, name: config.name ?? 'default'}]

try {
validateWorkspaces({workspaces: workspaceOptions})
Expand Down

0 comments on commit fe708e8

Please sign in to comment.