Skip to content

Commit 9d3e91b

Browse files
author
Eunjae Lee
authored
fix(voiceSearch): let the connector handle the default value of searchAsYouSpeak when it's not given (#3817)
1 parent 7488b57 commit 9d3e91b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/connectors/voice-search/connectVoiceSearch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const withUsage = createDocumentationMessageGenerator({
1515
});
1616

1717
export type VoiceSearchConnectorParams = {
18-
searchAsYouSpeak: boolean;
18+
searchAsYouSpeak?: boolean;
1919
};
2020

2121
export interface VoiceSearchRenderOptions<TVoiceSearchWidgetParams>
@@ -71,7 +71,7 @@ const connectVoiceSearch: VoiceSearchConnector = (
7171
);
7272
};
7373

74-
const { searchAsYouSpeak } = widgetParams;
74+
const { searchAsYouSpeak = false } = widgetParams;
7575

7676
return {
7777
init({ helper, instantSearchInstance }) {

src/widgets/voice-search/voice-search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const voiceSearch: VoiceSearch = (
7979
container,
8080
cssClasses: userCssClasses = {} as VoiceSearchCSSClasses,
8181
templates,
82-
searchAsYouSpeak = false,
82+
searchAsYouSpeak,
8383
} = {} as VoiceSearchWidgetParams
8484
) => {
8585
if (!container) {

0 commit comments

Comments
 (0)