File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
packages/instant-meilisearch/src Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export function validateInstantMeiliSearchParams(
6161 apiKey : string | ( ( ) => string ) ,
6262 instantMeiliSearchOptions : InstantMeiliSearchOptions
6363) {
64- const { requestConfig , httpClient } = instantMeiliSearchOptions
64+ const { requestInit , httpClient } = instantMeiliSearchOptions
6565 // Validate host url
6666 if ( typeof hostUrl !== 'string' ) {
6767 throw new TypeError (
@@ -76,9 +76,9 @@ export function validateInstantMeiliSearchParams(
7676 )
7777 }
7878
79- // Validate requestConfig
80- if ( requestConfig !== undefined && ! isPureObject ( requestConfig ) ) {
81- throw new TypeError ( 'Provided requestConfig should be an object' )
79+ // Validate requestInit
80+ if ( requestInit !== undefined && ! isPureObject ( requestInit ) ) {
81+ throw new TypeError ( 'Provided requestInit should be an object' )
8282 }
8383
8484 // Validate custom HTTP client
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ export function instantMeiliSearch(
6868 meilisearchConfig . httpClient = instantMeiliSearchOptions . httpClient
6969 }
7070
71- if ( instantMeiliSearchOptions . requestConfig !== undefined ) {
72- meilisearchConfig . requestConfig = instantMeiliSearchOptions . requestConfig
71+ if ( instantMeiliSearchOptions . requestInit !== undefined ) {
72+ meilisearchConfig . requestInit = instantMeiliSearchOptions . requestInit
7373 }
7474
7575 const meilisearchClient = new MeiliSearch ( meilisearchConfig )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ type BaseInstantMeiliSearchOptions = {
7171
7272export type InstantMeiliSearchOptions = Pick <
7373 MeilisearchConfig ,
74- 'requestConfig ' | 'httpClient'
74+ 'requestInit ' | 'httpClient'
7575> &
7676 BaseInstantMeiliSearchOptions
7777
You can’t perform that action at this time.
0 commit comments