naoufal / react-native-speech

A text-to-speech library for React Native.
https://www.npmjs.com/package/react-native-speech
304 stars 53 forks source link

supplying numbers to speak causing silent crash #23

Open radiovisual opened 7 years ago

radiovisual commented 7 years ago

If you supply this module with a number to speak, for example:

Speech.speak({ text: 5 });

it will result in a silent runtime error which crashes the app without any reported errors or stack traces.

I am simply casting all my number values to strings before sending them to react-native-speech to avoid this problem, but you might want to run an internal catch (or cast) to prevent these types of errors, and facilitate some nice error messages for a better debugging experience.