Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ Set isCloud property to speech options state #1262

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
provide default value on the change voice reducer
tomivm committed Sep 20, 2022
commit 7317274dc806a8bb05af47c7d312bf5c243d8b4b
2 changes: 1 addition & 1 deletion src/providers/SpeechProvider/SpeechProvider.actions.js
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ export function changeVoice(voiceURI, lang) {
return (dispatch, getState) => {
const isCloud =
getState().speech.voices.find(v => v.voiceURI === voiceURI)
.voiceSource === 'cloud';
?.voiceSource === 'cloud';
dispatch({
type: CHANGE_VOICE,
voiceURI,
2 changes: 1 addition & 1 deletion src/providers/SpeechProvider/SpeechProvider.reducer.js
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ function speechProviderReducer(state = initialState, action) {
...state.options,
voiceURI: action ? action.voiceURI : EMPTY_VOICES,
lang: action ? action.lang : DEFAULT_LANG,
isCloud: action.isCloud
isCloud: action ? action.isCloud || null : null
}
};
case RECEIVE_TTS_ENGINES:
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ describe('reducer', () => {
options: {
lang: '',
voiceURI: null,
isCloud: null,
pitch: 1.0,
rate: 1.0,
volume: 1