File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 30
30
},
31
31
"husky" : {
32
32
"hooks" : {
33
- "pre-commit" : " yarn lint:types && lint-staged"
33
+ "pre-commit" : " yarn lint:types && lint-staged" ,
34
+ "pre-push" : " yarn lint && yarn clean && yarn build && yarn test"
34
35
}
35
36
},
36
37
"author" : " @streamich" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ export interface SpeechOptions {
19
19
volume ?: number ;
20
20
}
21
21
22
- const voices = window . speechSynthesis . getVoices ( ) ;
22
+ const voices =
23
+ typeof window === 'object' && typeof window . speechSynthesis === 'object' ? window . speechSynthesis . getVoices ( ) : [ ] ;
23
24
24
25
const useSpeech = ( text : string , opts : SpeechOptions = { } ) : SpeechState => {
25
26
const [ state , setState ] = useSetState < SpeechState > ( {
You canβt perform that action at this time.
0 commit comments