Commit 491abe4
committed
fix: add type check for lastMessage.text before calling startsWith
Fixes #10430
The TTS useEffect was calling .startsWith() on lastMessage.text after only
checking if it was truthy. If text was a non-string truthy value (array,
object, or number), this would crash with "Q.text.startsWith is not a function".
Changed the truthy check to an explicit type check: typeof lastMessage.text === "string"1 parent 3074ccc commit 491abe4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
1019 | | - | |
| 1019 | + | |
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
| |||
0 commit comments