Skip to content

Commit 224b994

Browse files
authored
fix: sanityClient() does not accept undefined as apiHost (#272)
1 parent 6987821 commit 224b994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby-source-sanity/src/gatsby-node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ export const setFieldsOnGraphQLNodeType: GatsbyNode['setFieldsOnGraphQLNodeType'
437437
}
438438

439439
function getClient(config: PluginConfig) {
440-
const {projectId, dataset, apiHost, token} = config
440+
const {projectId, dataset, apiHost = 'https://api.sanity.io', token} = config
441441
return sanityClient({
442442
apiHost,
443443
projectId,

0 commit comments

Comments
 (0)