Skip to content

Commit

Permalink
fix: sanityClient() does not accept undefined as apiHost (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
runeb authored Oct 18, 2023
1 parent 6987821 commit 224b994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-source-sanity/src/gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export const setFieldsOnGraphQLNodeType: GatsbyNode['setFieldsOnGraphQLNodeType'
}

function getClient(config: PluginConfig) {
const {projectId, dataset, apiHost, token} = config
const {projectId, dataset, apiHost = 'https://api.sanity.io', token} = config
return sanityClient({
apiHost,
projectId,
Expand Down

0 comments on commit 224b994

Please sign in to comment.