Skip to content

Commit 25c17a5

Browse files
authored
Fix fuzzy placement
1 parent d7c6a61 commit 25c17a5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/useSiteSearch/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,14 @@ export function useSiteSearch<Client extends GenericClient>(
161161
query: state.query,
162162
locale: state.locale,
163163
build_trigger_id: config.buildTriggerId,
164+
...(config.fuzzySearch === true ? { fuzzy: true } : {}),
164165
},
165166
page: {
166167
limit: resultsPerPage,
167168
offset: resultsPerPage * state.page,
168169
},
169170
};
170171

171-
if (config.fuzzySearch) {
172-
request.fuzzy = 'true';
173-
}
174-
175172
const response = await config.client.searchResults.rawList(request);
176173

177174
if (!isCancelled) {

0 commit comments

Comments
 (0)