Skip to content

Commit

Permalink
fix(voiceSearch): let the connector handle the default value of searc…
Browse files Browse the repository at this point in the history
…hAsYouSpeak when it's not given (#3817)
  • Loading branch information
Eunjae Lee committed May 28, 2019
1 parent 7488b57 commit 9d3e91b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/connectors/voice-search/connectVoiceSearch.ts
Expand Up @@ -15,7 +15,7 @@ const withUsage = createDocumentationMessageGenerator({
});

export type VoiceSearchConnectorParams = {
searchAsYouSpeak: boolean;
searchAsYouSpeak?: boolean;
};

export interface VoiceSearchRenderOptions<TVoiceSearchWidgetParams>
Expand Down Expand Up @@ -71,7 +71,7 @@ const connectVoiceSearch: VoiceSearchConnector = (
);
};

const { searchAsYouSpeak } = widgetParams;
const { searchAsYouSpeak = false } = widgetParams;

return {
init({ helper, instantSearchInstance }) {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/voice-search/voice-search.tsx
Expand Up @@ -79,7 +79,7 @@ const voiceSearch: VoiceSearch = (
container,
cssClasses: userCssClasses = {} as VoiceSearchCSSClasses,
templates,
searchAsYouSpeak = false,
searchAsYouSpeak,
} = {} as VoiceSearchWidgetParams
) => {
if (!container) {
Expand Down

0 comments on commit 9d3e91b

Please sign in to comment.