From bd8d84689bf7458528df5e93c6d464dd45f4919a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kau=C3=AA=20Leivingson=20Romero=20Melo?= <69368947+Kaue-Romero@users.noreply.github.com> Date: Mon, 25 Mar 2024 23:31:47 -0300 Subject: [PATCH] Update VoiceTestFuncComp.tsx Typescript was complaining with some types. --- example/src/VoiceTestFuncComp.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/src/VoiceTestFuncComp.tsx b/example/src/VoiceTestFuncComp.tsx index 955a0b8b..0d4f5dea 100644 --- a/example/src/VoiceTestFuncComp.tsx +++ b/example/src/VoiceTestFuncComp.tsx @@ -19,8 +19,8 @@ function VoiceTest() { const [error, setError] = useState(''); const [end, setEnd] = useState(''); const [started, setStarted] = useState(''); - const [results, setResults] = useState([]); - const [partialResults, setPartialResults] = useState([]); + const [results, setResults] = useState([]); + const [partialResults, setPartialResults] = useState([]); useEffect(() => { Voice.onSpeechStart = onSpeechStart; @@ -127,7 +127,7 @@ function VoiceTest() { {`Volume: ${volume}`} {`Error: ${error}`} Results - {results.map((result, index) => { + {results?.map((result, index) => { return ( {result} @@ -135,7 +135,7 @@ function VoiceTest() { ); })} Partial Results - {partialResults.map((result, index) => { + {partialResults?.map((result, index) => { return ( {result}